'PICAXE-08 serial OUTPUT data control link for July 2003 SiChip article. V 1.0 15/5/03 'Needs matching input program & PICAXE hardware at receiver unit for sender control 'Connect status check LED via 220 Ohm dropper R & toggle switch Pin 0 with pulldown R 'Simple 2 wire data link can be greatly extended or even replaced with damp string ! 'Variable b0= switch status ( 0=off/low, 1=on/high ) with 10k pulldown resistor 'Pause times at sender may need tweaking to synch. with receiver - decoding o'heads ? 'Via Stan.SWAN (MU@W, New Zealand) => s.t.swan@massey.ac.nz <= '------------------------------------------------------------------------------------- 'Lines beginning ' are program comments etc & may be ignored if need be 'Program available for web download => www.picaxe.orcon.net.nz/tx.bas '------------------------------------------------------------------------------------- state: ' procedure to serial data send local switch status serout 4,n2400,(b0) ' setup & 2400bps send b0 value as serial output pin 4 if pin1=1 then fastbeep ' if local switch is on/high jump to fastbeep slowbeep: ' lazy slowbeep if switch is off (0) b0=0 ' set switch status variable b0=0 pulsout 2, 5000 ' pulse attached LED at pin 2 for local confirmation pause 2000 ' 2 sec. delay (may need altering for synch ?) goto state ' loop back to switch status routine fastbeep: ' fastbeep urgent routine if switch is on (1) b0=1 ' assign switch status variable b0=1 pulsout 2,5000 ' pulse attached LED at pin 2 for local confirmation pause 500 ' 1/2 sec. delay (may also need altering for synch ?) goto state ' loop back to switch reading routine