
www.picaxe.com/products/axe171
AXE171 PICAXE-14 Audio Kit © Revolution Education Ltd 2015 v1.1
May be copied for educational use.
13
4.2.3 Testing the switch
The AXE171 project board has a switch on:
Input pinC.0
Therefore make sure the correct pin number is selected within each PICAXE command.
After connecting the switch it can be tested by a simple program like this. This program will switch
an output on and off according to whether the switch is pushed or not.
Blockly
Flowchart
BASIC
do
if
pinC.0
=
1
then
; test pinC.0
high
B.2
; LED on
else
low
B.2
; LED off
end if
loop