Arduino Function: RobotMotor.IRread

Description

This function is used to read a specific IR sensor. IR sensors on Control Board use instead the updateIR() function. This function can only be called from the Motor Board processor.

Syntax

RobotMotor.Irread(num)

Parameters

num: 1 to 5, corresponding to sensors 1 to 5.

Returns

 int : 0 to 1023

Examples

#include 
void setup(){
 Serial.begin(9600);
 RobotMotor.begin();
}
void loop(){
 Serial.println(RobotMotor.IRread(1));
 delay(10);
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc