Compare commits

...

2 Commits

Author SHA1 Message Date
Kilian DECLERCQ 90555db047 Merge branch 'develop' 2022-04-07 08:55:07 +02:00
Kilian DECLERCQ ed1830fdd0 motion 2022-04-07 08:54:25 +02:00
1 changed files with 29 additions and 0 deletions

29
motion/motion.ino Normal file
View File

@ -0,0 +1,29 @@
#include "MeMCore.h"
const int Port_1 =9;
const int Port_2 =10;
MeDCMotor motor1(Port_1);
MeDCMotor motor2(Port_2);
uint8_t motorSpeed =255;
void setup()
{
}
void loop()
{
motor1.run(motorSpeed); /* value: between -255 and 255. */
motor2.run(motorSpeed); /* value: between -255 and 255. */
delay(2000);
motor1.stop();
motor2.stop();
delay(100);
motor1.run(-motorSpeed);
motor2.run(-motorSpeed);
delay(2000);
motor1.stop();
motor2.stop();
delay(100);
}