Merge branch 'develop'

This commit is contained in:
Kilian DECLERCQ 2022-04-07 08:55:07 +02:00
commit 90555db047
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);
}