Datasheet

Table Of Contents
21
revolution
(c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.1 04/10
BOT120.PMD
BOT120 PICAXE-20X2 MICROBOT
Programming Example 2 – Push Button Switch
The push button is pre-fitted to the Microbot motherboard and is
connected to input pin C.6. Reading pin C.6 will return a reading of 1
when the button is pushed and a value of 0 when it is not pushed.
The following program tests the operation of the push button by lighting
the right LED on the motherboard when the button is pushed.
Sample Logicator Flowchart File:
BOT120 PUSH SWITCH TEST.PLF
Sample BASIC File:
BOT120 PUSH SWITCH TEST.BAS
main:
if pinC.6 = 1 then
high B.3
else
low B.3
end if
goto main