699 octets ajoutés
, 17 septembre 2013 à 15:41
{{Arduino-Robot-NAV}}
<h4>IRread()</h4>
== Description ==
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 [[RB-ARD-ROBOT-Func-updateIR|updateIR()]].
== Syntaxe ==
RobotMotor.IRread(num)
== Paramètres ==
'''num''': 1 to 5, corresponding to sensors 1 to 5.
== Résultat ==
int : 0 to 1023
== Exemple ==
<nowiki>#include <ArduinoRobotMotorBoard.h>
void setup(){
Serial.begin(9600);
RobotMotor.begin();
}
void loop(){
Serial.println(RobotMotor.IRread(1));
delay(10);
}</nowiki>
== Voir aussi ==
* [[RB-ARD-ROBOT-FuncMotor-motorsWrite|motorsWrite()]]
{{Arduino-Robot-TRAILER}}