Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home3/validus/public_html/wp-includes/class-wp-hook.php on line 298

02 – Testing the Bot120 PICAXE-20X2 Microbot

The following tests are designed to test the Microbot and it also provides excellent training exercises to learn how to program the Bot120 Microbot.


 

Testing the LED eyes of the Microbot
The two LED eyes will always flash when the Microbot is programmed or when it is switched on. This is normal and indicates that the Microbot is working correctly. The following program will turn on the left LED for half a second and then turn it off again. It will then turn on the right LED for a half second and turn it off again. The process will then repeat indefinitely. The program is shown below.

You can download the program file, Bot120 LED eyes test by right clicking on it and selecting ‘save link as’ from the popup menu.


 

Testing the Push Button on the Microbot
The Push Button on the Microbot is connected to the input pin C.6. When the push button is pressed C.6 will return a value of 1 and if it is not pressed it will return a value of 0. The Push Button can be tested with the following program:

You can download the program file, Bot120 Push Button Test by right clicking on it and selecting ‘save link as’ from the popup menu.


 

Testing the Bumper switches of the Microbot
The left Bumper switch is connected to Input Pin C.1 and the right Bumper switch is connected to Input Pin C.3. A bump will set the input pins to 1. Three conditions can be distinguished: a bump on the left will input a 1 on C.1, a bump on the right will input a 1 on C.3 and a bump from the front will input a 1 on C.1 and C.3. With this information one can determine what appropriate action to take when the Microbot registers a bump or collision.

The following program can be used to manually test the bumper switches:

You can download the program file, Bot120 Bumper Switch Test by right clicking on it and selecting ‘save link as’ from the popup menu.


 

Testing the Piezo Sounder of the Microbot
The Microbot has a piezo sounder connected to output pin B.2 and it is mounted on the motherboard under the battery holder. The piezo sounder can be used to play a variety of sounds and tunes. It can be used to play sounds that co-inside with specific actions for instance play a peeping sound when the Microbot is reversing. The following program play a two tune beep if the push button is pressed.

You can download the program file, Bot120 Piezo Sounder Test by right clicking on it and selecting ‘save link as’ from the popup menu.