Compare commits
2 Commits
8f0adb94c0
...
5db3b9dbc7
| Author | SHA1 | Date |
|---|---|---|
|
|
5db3b9dbc7 | |
|
|
9052afb661 |
|
|
@ -11,16 +11,15 @@ void setup() {
|
|||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
_leftMotor.run(50);
|
||||
_rightMotor.run(50);
|
||||
delay(3000);
|
||||
_leftMotor.stop();
|
||||
_rightMotor.stop();
|
||||
|
||||
getMoving(80, 1, -1, 3000);
|
||||
}
|
||||
|
||||
void turn(int speed, int direction, int time){
|
||||
|
||||
void getMoving(int speedMove, int dirRight, int dirLeft, int timeMove){
|
||||
//if direction = -1 turn right
|
||||
_leftMotor.run(50);
|
||||
_rightMotor.run(50);
|
||||
_leftMotor.run(dirLeft*speedMove);
|
||||
_rightMotor.run(dirRight*speedMove);
|
||||
delay(timeMove);
|
||||
_leftMotor.stop();
|
||||
_rightMotor.stop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
#include <MeMCore.h>
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
#include <MeMCore.h>
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue