Lab 01-Programming Basics

Arduino Programming Basics 
The purpose of this lab was to become familiar with the automatic control system hardware components. In order to do so, the team setup the AEV software and began programming basic function command calls in controlling the AEV. The group learned that it is important to make sure that the light stops blinking before unplugging the cable from the Arduino signaling that the program has been uploaded. Once running the code, the performance of the electric motors was good and the propellers acted as programmed. The main take away from this lab was that when  they program called for a break in the motors, there was a delay. Basic function calls are explained under the glossary section of group E.
Figure 4: Lab and AEV parts assembled (taken from MC&R deliverable)

PROGRESS REPORT Q&A:

  1. Both motors run smoothly and the arduino code transfered to the board with ease. when the code ran, the motors accelerated correctly followeing scenario 1 line one and 2 however in line 3 when it says to brake motor one, both the motors instead of just motor one.  The group then decided to unplug the cord connected to the board from the front of the computer to the back. The group then uploaded the code to the board once again and the computer represented an error message.

AEV CODE USED:
Compiled by Madison Geiger

  // intialize motor, accelerate to 15% in 2.5 seconds
  celerate(1,0,15,2.5);
  //run motor one at 15% for one second
  motorSpeed(1,15);
  goFor(1);
  // Brake motor one.
  brake(1);
  //accelerate motor 2 from start to 27% in 4 seconds
  celerate(2,0,27,4);
   // decelerate motor two to 15% power in 1 second
   celerate(2,27,15,1);
   //brake motor 2
   brake(2);
   //reverse direction of motor 2
   reverse(2);
   //accelerate all motors from start to 31% in 2 seconds
   celerate(4,15,31,2);
   //running 
   motorSpeed(4,35);
   goFor(1);
   //brake motor two, keep motor 1 running
   brake(2);
   motorSpeed(1,35);
   goFor(3);
   //brake all for 1 second
   brake(4);
   goFor(1);
   // reverse motor 1
   reverse(1);
   // accelerate motor m1 from start to 19 over 2 seconds\
   celerate(1,0,19,2);
   // run motor 2 at 35% while simultaneously running motor 1 at 19% for 2 seconds
   motorSpeed(1,19);
   goFor(2);
   motorSpeed(2,35);
   goFor(2);
   // run both motors at 19 for 2 seconds
   motorSpeed(4,19);
   goFor(2);
   // decelerate both motors to 0 in 3 seconds
   celerate(4,19,0,3);
   brake(4);