Rover R20 has an Arduino MEGA microcontroller.
Pin 22: LED
Pin 24: LED
Pin 26: LED
Pin 28: LED
Pin 30: LED
Pin 32: LED
Pin 34: Bumper front right
Pin 36: Bumper front left
Pin 38: Bumper rear right
Pin 40: Bumper rear left
Pin 44: Drive servo right
Pin 46: Drive servo left
To switch the right servo to drive forward, the rotation angle must be set to 60, and to 120 to drive backwards.
The values for the left servo must be swapped. A rotation angle of 120 degrees applies to forwards, a rotation angle of 60 applies to backwards.
Similarly, the rover will rotate to the left if both rotation angles are set to 60 degrees and the rover will rotate to the right if both servos are set to a rotation angle of 120. It's best to turn on all LEDs, because it could be dark on my attic when you send your code!
Use the following example code as a basis for your experiments:
With the code, the rover drives back, then turns left, moves forward, turns left, and so on in an endless loop. Modify the code and see how the rover moves with your code. The 6 LEDs are switched on in the setup routine so that you can see a little even in the dark.
You know what do do? let's move the robot!
Send an email to R20 by klicking on this link. (your mail program should open). Don't forget to attach your Arduino project file (*.ino) or copy the code into the email text!
Your email with the lines of code will be answered automatically and if your code compiled without errors, you will receive a video file showing what the rover recorded during its journey. Your code and this video file will also be published on this page so that others can learn from your ideas. The submitted code automatically becomes open source! So don't send anything that you want to keep secret. Have patience! Processing the email and sending a reply takes a few minutes!
So don't send the same email multiple times just because you didn't receive the answer immediately or the result doesn't appear on this page! However, if nothing has happened after 15 minutes, send me a bug report that also includes your code.
You like the idea and want to spend me an Obol?
Chocolate bars as comfort food while writing on these pages and operating the server consumes my money.
Help to keep this project running with your donation.