code for the motion of the robot
This commit is contained in:
parent
005c8ba090
commit
66c4cd0ab4
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include "Arduino.h"
|
||||||
|
#include "Wire.h"
|
||||||
|
#include "MeMCore.h"
|
||||||
|
#include "SoftwareSerial.h"
|
||||||
|
|
||||||
|
MeDCMotor _leftMotor(9);
|
||||||
|
MeDCMotor _rightMotor(10);
|
||||||
|
|
||||||
|
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(-150);
|
||||||
|
_rightMotor.run(100);
|
||||||
|
delay(10000);
|
||||||
|
_leftMotor.stop();
|
||||||
|
_rightMotor.stop();
|
||||||
|
delay(1000);
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue