Reflectance Sensors

The Reflectance Sensor tests introduced Team F to the basics of the reflectance sensors and the code that is involved in using them. The first assignment of the test was to connect the sensor to the micro-controller which was successfully done, a picture of this can be seen below.

Using the reflectanceSensorTest() command while the Arduino was on, Team F checked to make sure the external sensors were connected to the AEV as well as working properly. They then wrote a code according to a scenario given from the Preliminary R&D document and was run, this code is linked below.

Glossary of Arduino Functions

Code Comment
motorSpeed(4,25); //All Motors 25%
goFor(2); //For 2 Seconds
motorSpeed(4,20); //All Motors 20%
goToAbsolutePosition(295.38); //Go to 12 feet
reverse(4); //Reverse all motors
motorSpeed(4,30); //All motors 30%
goFor(1.5); //For 1.5 seconds
brake(4); //Brake all motors

After running this code Team F realized the importance of these sensors in their design of the AEV. With the external reflectance sensors, the AEV would not be able to stop with much precision and would most likely travel to far without a way of tracking distance. Thought the braking is not efficient, the external sensors would be able to make up for this inefficiency and allow for the AEV to stop earlier than the stopping location.