Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
Get the reading from a specific IR sensor. This can only be called from the Motor Board processor. To read the IR sensors from the Control Board, use updateIR().
RobotMotor.IRread(num)
num: 1 to 5, corresponding to sensors 1 to 5.
int : 0 to 1023
#include <ArduinoRobotMotorBoard.h>
void
setup
(
)
{
Serial.begin
(
9600
)
;
RobotMotor.begin
(
)
;
}
void
loop
(
)
{
Serial.println
(RobotMotor.IRread
(
1
)
)
;
delay
(
10
)
;
}
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.