Preliminary R&D 2 : Reflectance Sensors

Deliverables:
1.) Picture of sensors secured to AEV.
2.) Describe the function of the reflectance sensors and their importance in completing the MCR.
The function of the reflectance sensors is that they allow the AEV to determine how much distance has passed and in what direction. Reflective metal on the wheels is sensed every time it passes by the sensors (counts as one mark) and it is also sensed which way the wheel is moving. This is important to the MCR as it allows the AEV to be programmed to go to specific distances in different directions to complete its missions.
Code:

motorspeed(4,25);                                                   // run all motors at 25% power

goFor(2);                                                                     // run for 2 seconds

goToAbsolutePosition(295);                                 // travel a distance of 12 feet or 295 marks

motorSpeed(4,20);                                                   // run all motors at 20% power

reverse(4);                                                                  // reverse all motors

motorSpeed(4,30);                                                   // run all motors at 30% power

goFor(1.5);                                                                  // run for 1.5 seconds

brake(4);                                                                      // brake all motors