Arduino Programming Basics

This programming exercise initialized the experimental research phase of the design process, during which Group B became familiar with the AEV’s hardware and software capabilities. Control of the vehicle relies on Arduino hardware, the Arduino programming environment, and the proper implementation of a library of pre-written functions. After correctly importing this library the team wrote and debugged a test program to complete the scenario outlined in Figure 2 of the appendix. The results of the program’s execution were analyzed to understand the parameters and syntax of each function and to observe the consequent motor activities. Knowledge obtained in this lab enabled the team to begin programming the AEV’s control system.

2scenarioFigure 1: Arduino Scenario

 

2codeFigure 2: Arduino Code

The team discovered many functions that were used to operate the drive motors; parameters of which may be adjusted to increase efficiency. The most notable function for the AEV would be the “celerate”, and “brake” functions. The “celerate” function would allow for the most energy conservation. The command would allow the AEV to achieve the same speed as the “motorspeed” function without expending as much power. The brake function could also be utilized to save power. It could be used to allow the AEV to coast to a stop, thus saving power. The “motorspeed” function could prove to be efficient as well if used with the “gofor” function. The “motorspeed” function would set the percent of power to be used, and then the “gofor” command could be used to terminate the motors after a given period of time. This would allow the AEV to coast over smaller intervals. All of these new commands can be utilized to save power.

Leave a Reply

Your email address will not be published. Required fields are marked *