Motion folder and Arduino code for the robot to change motor status added.
This commit is contained in:
parent
5aa4fc4397
commit
adb23d38d8
|
|
@ -0,0 +1,22 @@
|
||||||
|
#include "Arduino.h"
|
||||||
|
#include "Wire.h"
|
||||||
|
#include "MeMCore.h"
|
||||||
|
#include "SoftwareSerial.h"
|
||||||
|
|
||||||
|
MeDCMotor _leftMotor(9);
|
||||||
|
MeDCMotor _rightMotor(10);
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
_leftMotor.run(0);
|
||||||
|
_rightMotor.run(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
_leftMotor.run(100);
|
||||||
|
_rightMotor.run(-100);
|
||||||
|
delay(2000);
|
||||||
|
_leftMotor.stop();
|
||||||
|
_rightMotor.stop();
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue