From adb23d38d897c443da75369dd098942f7acf606f Mon Sep 17 00:00:00 2001 From: "mattis.roellinger" Date: Mon, 11 Mar 2024 08:54:02 +0100 Subject: [PATCH] Motion folder and Arduino code for the robot to change motor status added. --- Motion/Motion.ino | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Motion/Motion.ino diff --git a/Motion/Motion.ino b/Motion/Motion.ino new file mode 100644 index 0000000..63fba8a --- /dev/null +++ b/Motion/Motion.ino @@ -0,0 +1,22 @@ +#include "Arduino.h" +#include "Wire.h" +#include "MeMCore.h" +#include "SoftwareSerial.h" + +MeDCMotor _leftMotor(9); +MeDCMotor _rightMotor(10); + +void setup() { + _leftMotor.run(0); + _rightMotor.run(0); + +} + +void loop() { + _leftMotor.run(100); + _rightMotor.run(-100); + delay(2000); + _leftMotor.stop(); + _rightMotor.stop(); + +}