The Challenge
We needed to build and program a bot that could detect when the lights were off and wander slowly and aimlessly. As well as detect when the lights where turned on and pick up speed. This bot needed to act in a similar fashion to a cockroach.
Input Factors
We needed to find the average light value with the lights on and off to set a light value for the program the bot will follow that would not be too high or too low.
Prototype 1
We had taken the bot we had used for the Parking Space Bot and modified it by replacing the single wheel with two skis for better stability.
Program (true)
This program detects when the lights are on or off by comparing the light value it reads with a value that has been predetermined and follows its program according to weather the light value is true or false. In this case this is the directions followed by the bot when the light value is read as true. The bot will quickly accelerate when the light value is true similar to a cockroach.
Program (false)
This is what the bot follows when the light value is read as false. It will travel slowly indefinite period of time.
Final Output
The final product is a bot with two motors, one for each wheel, as well as skids for added support. The bot is able to detect when the lights are on or off and follow its programing in such a manner as to fulfill the challenge requirements.
What I Learned
I learned how to program a bot that is capable of behaving similar to a cockroach.
What I Would Do Differently
There is not anything I would do differently.