Software Code Picaxe

PICAXE Code - Gathers data from the sensors, sends it to the ARM-7 via i2c

setfreq m4

HI2CSETUP I2CSLAVE, %10110000

main:

high 4

w0 = 0x0000
w1 = 0x0000

readadc10 1, w0 ‘ read value into b1

put 1, word w0', word w0

pause 150 ' short delay

readadc10 2, w1 ' read value into b2

put 3, word w1', word w1

low 4

pause 750
'debug

goto main ‘ loop back to start