Compare commits
6 Commits
4030b64f6d
...
15562311fd
| Author | SHA1 | Date |
|---|---|---|
|
|
15562311fd | |
|
|
b08982862e | |
|
|
5db3b9dbc7 | |
|
|
9052afb661 | |
|
|
8f0adb94c0 | |
|
|
597b2ff15e |
|
|
@ -0,0 +1,25 @@
|
|||
#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:
|
||||
getMoving(80, 1, -1, 3000);
|
||||
}
|
||||
|
||||
|
||||
void getMoving(int speedMove, int dirRight, int dirLeft, int timeMove){
|
||||
//if direction = -1 turn right
|
||||
_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,15 @@
|
|||
#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:
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue