This commit is contained in:
rio.loann 2023-04-24 09:04:14 +02:00
parent cfb9bf3bd6
commit 48c52490a4
3 changed files with 60 additions and 0 deletions

37
motion/motion.ino Normal file
View File

@ -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

9
roomba/roomba.ino Normal file
View File

@ -0,0 +1,9 @@
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}

View File

@ -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());
}