go forward
This commit is contained in:
parent
597b2ff15e
commit
8f0adb94c0
|
|
@ -1,9 +1,26 @@
|
|||
#include <MeMCore.h>
|
||||
|
||||
MeDCMotor _rightMotor(10);
|
||||
MeDCMotor _leftMotor(9);
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
_leftMotor.run(0);
|
||||
_rightMotor.run(0);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
_leftMotor.run(50);
|
||||
_rightMotor.run(50);
|
||||
delay(3000);
|
||||
_leftMotor.stop();
|
||||
_rightMotor.stop();
|
||||
|
||||
}
|
||||
|
||||
void turn(int speed, int direction, int time){
|
||||
//if direction = -1 turn right
|
||||
_leftMotor.run(50);
|
||||
_rightMotor.run(50);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue