roomba
This commit is contained in:
parent
cfb9bf3bd6
commit
48c52490a4
|
|
@ -0,0 +1,37 @@
|
|||
#include <MeMCore.h>
|
||||
|
||||
<<<<<<< HEAD
|
||||
MeDCMotor _leftMoto(9);
|
||||
MeDCMotor _rightMoto(10);
|
||||
=======
|
||||
MeDCMotor _leftMotor(9);
|
||||
MeDCMotor _rightMotor(10);
|
||||
>>>>>>> develop
|
||||
|
||||
void setup()
|
||||
{
|
||||
_leftMotor.run(0);
|
||||
_rightMotor.run(0);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
_leftMotor.run(0);
|
||||
_rightMotor.run(0);
|
||||
|
||||
delay(50);
|
||||
=======
|
||||
_leftMotor.run(100);
|
||||
_rightMotor.run(-100);
|
||||
|
||||
delay(5000);
|
||||
>>>>>>> develop
|
||||
|
||||
_leftMotor.stop();
|
||||
_rightMotor.stop();
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> develop
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#include <MeMCore.h>
|
||||
|
||||
MeUltrasonicSensor sensor(3);
|
||||
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
Serial.begin(9600);
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
Serial.println(sensor.distanceCm());
|
||||
}
|
||||
Loading…
Reference in New Issue