Summary:
In this activity for our guided research phase, team C was tasked to attach the “reflectance sensors”, devices used to track the direction and distance moved for our vehicle, to our Advanced Energy Vehicle. Once our sensors were attached, we were to run a specific line of code in order to test if the sensors worked, as these sensors would be extremely vital to our vehicles functionality. The reflectance sensors would allow our vehicle to track the distance traveled, and whether or not it is going forward or backwards.
Reflectance attached to vehicle
Code What it does
celerate(4,0,25,3); //Accelerate all motors from start to 25% in 3 seconds
motorSpeed(4,25); //Run all motors at a constant speed (25%)
goFor(1); //Run for 1 second
motorSpeed(4,20); //Run all motors at 20% power
goFor(2); //Run for 2 seconds
reverse(4); //Reverse all motors
motorSpeed(4,25); //Run all motors at constant speed (25% power)
goFor(2); //Run for 2 seconds.
brake(4); //Brake all motors
Takeaways
The reflectance sensors are by far one of the most essential parts of our vehicle as they help our vehicle record distance traveled, and will be what allows us to make our vehicle work efficiently. By completing this lab, all of the members of our team learned how important the implementation of these sensors are to our AEV, and how making sure the sensors work efficiently, and are tested properly before the labs is extremely vital.