During Lab 2 we became familiar with the programming syntax of the Arduino micro-controller. The College of Engineering staff provided us with prewritten functions to easily control the AEV vehicle via higher level commands. To utilize these prewritten functions in controlling or AEV to complete the scenario we had to first properly understand the syntax. We learned the syntax of commands for simple power calls to the motor, accelerated power calls, and braking. A copy of the summary is provide below:
Michael Ahlbeck-Fetch, Chenchao Jin, Thinh Tran, Bolong Zhang Lab 5: System Analysis 1
Group J – Instr. Kadri Parris, GTA Hossein Qarib February 18th, 2015
Executive Summary
Introduction to basic function calls of Arduino. A program is written based on the scenario presented General Guidelines of Lab 2. Initial testing show 15% of power barely move the propellers proving it’s lacking for operation use. For testing, time interval needed to be lengthen to make motors behavior recognizable. More tools and capabilities are needed to determine AEV’s position and speed in relation to its course, such as sensors and reflective wheels. The written program is presented below:
// Accel motor 1 0-10% in 3s
celerate(1,0,10,3);
// Run motor 1 at 10% for 1s
motorSpeed(1,10);
goFor(1);
// Brake motor 1
brake(1);
// Accel motor 2 0-27% in 4s
celerate(2,0,27,4);
// Run motor 2 at 27% for 3s
motorSpeed(2,27);
goFor(3);
// Decel motor 2 27-20% in 1s
celerate(2,27,20,1);
// Brake motor 2
brake(2);
// Reverse motor 2
reverse(2);
// Accel all motors 0-34% in 4s
celerate(4,0,34,4);
// Run all motors at 30% for 2s
motorSpeed(4,30);
goFor(2);
// Brake motor 2, motor 1 keep running at 30% for 2s
brake(2);
motorSpeed(1,30);
goFor(2);
// Brake all motors for 1s
brake(4);
goFor(1);
// Reverse motor 1
reverse(1);
// Accel motor 1 0-15% in 2s
celerate(1,0,15,2);
// Run motor 2 at 21% while running motor 1 at 15% for 2s
motorSpeed(2,21);
motorSpeed(1,15);
goFor(2);
// Run both motor at 21% for 2s
motorSpeed(4,21);
goFor(2);
// Reverse motor 1
reverse(1);
// Run both at last constant speed for 2s more
motorSpeed(4,21);
goFor(2);
// Decel both to 0% in 5s
celerate(4,21,0,5);
// Brake all motors
brake(4);