Programming Basics

Programming Basics

Exercise 1 of the PR&D is designed to learn the programming basics of Arduino. Also, it helps you learn to format your computer to upload and compile correctly. Without the first exercise, the rest of the labs would be very difficult to figure out. This program runs various commands to also test the Arduino to make sure its working.

 

celerate(1,0,15,2.5);
motorSpeed(1,15);
goFor(1);
brake(1);
celerate(2,0,27,4);
motorSpeed(2,27);
goFor(2.7);
celerate(2,27,15,1);
brake(2);
reverse(2);
celerate(4,0,31,2);
motorSpeed(4,35);
goFor(1);
brake(2);
motorSpeed(1,35);
goFor(3);
brake(4);
goFor(1);
reverse(1);
celerate(1,0,19,2);
motorSpeed(2,35);
motorSpeed(1,19);
goFor(2);
motorSpeed(4,19);
goFor(2);
celerate(4,19,0,3);
brake(4);