RB-ARD-ROBOT-FuncMotor-motorsWrite
begin()
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
#include <ArduinoRobotMotorBoard.h> void setup(){ RobotMotor.begin(); } void loop(){ RobotMotor.motorsWrite(255,255); delay(1000); RobotMotor.motorsWrite(0,0); delay(1000); }
Voir aussi
Source: Arduino Robot, getting started with the Arduino Robot, the Robot's library pages. Crédit: Arduino.cc, licence Creative Common Attribution ShareAlike.
Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : « Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.
L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.