Modifications

Sauter à la navigation Sauter à la recherche
Page créée avec « {{Arduino-Robot-NAV}} <h4>begin()</h4> == Description == Control the robot's wheels speed and direction from the Motor Board processor. It's different from motorsWrite() of... »
{{Arduino-Robot-NAV}}

<h4>begin()</h4>

== Description ==
Control the robot's wheels speed and direction from the Motor Board processor. It's different from motorsWrite() of the control board. This one drives the motors directly, while the former sends signals to the motor board. So don't mix them in usage.

== Syntaxe ==

RobotMotor.motorsWrite(speedL, speedR)

== Paramètres ==

* speedLeft: controls the speed of left wheel.
* speedRight: controls the speed of right wheel.

Both values can be from -255 to 255. If the value is bigger than 0, the wheel turns forward. Smaller than 0, the motor turns backwards.

== Résultat ==

aucun

== Exemple ==

<nowiki>#include <ArduinoRobotMotorBoard.h>

void setup(){
RobotMotor.begin();
}

void loop(){
RobotMotor.motorsWrite(255,255);
delay(1000);
RobotMotor.motorsWrite(0,0);
delay(1000);
}</nowiki>

== Voir aussi ==
* [[RB-ARD-ROBOT-FuncMotor-IRread|IRread()]]

{{Arduino-Robot-TRAILER}}
29 917

modifications

Menu de navigation