From c2a87cdbd8213f21b6a40e399bf345efbfef8835 Mon Sep 17 00:00:00 2001 From: Aaron John Sabu <aaronjohnsabu1999@gmail.com> Date: Mon, 25 Oct 2021 19:27:46 -0700 Subject: [PATCH] Added Serial print commands to motor basic test --- .../Motor_Basic_Test.ino | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) rename Code/Control/Feather Code - Aaron/{ => Motor_Basic_Test}/Motor_Basic_Test.ino (56%) diff --git a/Code/Control/Feather Code - Aaron/Motor_Basic_Test.ino b/Code/Control/Feather Code - Aaron/Motor_Basic_Test/Motor_Basic_Test.ino similarity index 56% rename from Code/Control/Feather Code - Aaron/Motor_Basic_Test.ino rename to Code/Control/Feather Code - Aaron/Motor_Basic_Test/Motor_Basic_Test.ino index 9208590..cae4010 100644 --- a/Code/Control/Feather Code - Aaron/Motor_Basic_Test.ino +++ b/Code/Control/Feather Code - Aaron/Motor_Basic_Test/Motor_Basic_Test.ino @@ -1,4 +1,4 @@ -// Motor Test Code - Aaron +// Motor Basic Test Code - Aaron #include <Wire.h> #include <Adafruit_MotorShield.h> @@ -11,37 +11,51 @@ Adafruit_DCMotor *motorVL = AFMS.getMotor(1); Adafruit_DCMotor *motorVR = AFMS.getMotor(2); Adafruit_DCMotor *motorHL = AFMS.getMotor(3); Adafruit_DCMotor *motorHR = AFMS.getMotor(4); + void setup() { + Serial.begin(115200); AFMS.begin(); } void loop() { + Serial.println("-- START LOOP ---"); + Serial.println(); + Serial.println(" Vertical Left - Forward Fast"); motorHR->setSpeed(0); motorVL->setSpeed(largeVal); motorVL->run(FORWARD); - delay(5000); + delay(2000); + Serial.println(" Vertical Left - Backward Slow"); motorVL->setSpeed(smallVal); motorVL->run(BACKWARD); - delay(5000); + delay(2000); + Serial.println(" Vertical Right - Forward Fast"); motorVL->setSpeed(0); motorVR->setSpeed(largeVal); motorVR->run(FORWARD); - delay(5000); + delay(2000); + Serial.println(" Vertical Right - Backward Slow"); motorVR->setSpeed(smallVal); motorVR->run(BACKWARD); - delay(5000); + delay(2000); + Serial.println(" Horizontal Left - Forward Fast"); motorVR->setSpeed(0); motorHL->setSpeed(largeVal); motorHL->run(FORWARD); - delay(5000); + delay(2000); + Serial.println(" Horizontal Left - Backward Slow"); motorHL->setSpeed(smallVal); motorHL->run(BACKWARD); - delay(5000); + delay(2000); + Serial.println(" Horizontal Right - Forward Fast"); motorHL->setSpeed(0); motorHR->setSpeed(largeVal); motorHR->run(FORWARD); - delay(5000); + delay(2000); + Serial.println(" Horizontal Right - Backward Slow"); motorHR->setSpeed(smallVal); motorHR->run(BACKWARD); - delay(5000); + delay(2000); + Serial.println(); + Serial.println(); } -- GitLab