I have been able to read outside temperature with an RF link to base.
Initially the cound and readadc lines were rem'd out and serout of b1 & b2 were deleted. Results were consistent and perfect. The display at base showed time, date,room temp & this air temp ( b0 ). So Tx and Rx progs O.K.
I then "let in" the speed ( count on pin 3 ). Disaster ! Temperature dropped to minus 140 and wind count was constant at 32. Not quite Hertfordshire on a September afternoon.
I then hard wired the 08 serout ( pin 0 ) to the relevant serin 2 on the base 18x. Same result.
So I tried these codes.
For the Tx
and for the Rx
I seem to be losing the first ( b1 ) variable.
The dump from sertxd is
Why do I not read 27, 40, 90. I get the same result via RF or hard wired. Gone round in circles on this.
Thanks,
Russ
Code:
#picaxe 08M
main:
readtemp 2,b0 'get temperature
count 3,1000,b1 'get speed
readadc 4,b2 'get direction
pause 100
SerOut 0, n600, ("UUUUU") 'open TX
Pause 100
SerOut 0, n600, ("XYZ ",b0,b1,b2 ) 'Transmit data
pause 100
low 0 'TX sleep
pause 5000 ' Approx 1/2 minute
goto main
I then "let in" the speed ( count on pin 3 ). Disaster ! Temperature dropped to minus 140 and wind count was constant at 32. Not quite Hertfordshire on a September afternoon.
I then hard wired the 08 serout ( pin 0 ) to the relevant serin 2 on the base 18x. Same result.
So I tried these codes.
For the Tx
Code:
#picaxe 08M
main:
high 0
b0=27:b2=40:b4=90
pause 100
SerOut 0, T600_4, ("UUUUUUUUUU") 'open TX
Pause 200
SerOut 0, T600_4, ("XYZ",b0,b2,b4 ) 'Transmit data
pause 200
low 0 'TX sleep
pause 5000 ' Approx 1/2 minute
goto main
Code:
#picaxe 18x
high 7:high 2
serout 7,T2400,(254,1,254,1) 'clear screen
pause 500
main:
pause 500
Serin 2,T600, ("XYZ"),b1,b2,b3
pause 100
serout 7,t2400,(254,192,"b1= ",#b1," b2= ",#b2)
sertxd ("b1 ",#b1," b2 ",#b2," b3 ",cr,lf)
goto main
The dump from sertxd is
Code:
b1= 32 b2= 27 b3= 40
b1= 32 b2= 27 b3= 40
b1= 32 b2= 27 b3= 40
b1= 32 b2= 27 b3= 40
b1= 32 b2= 27 b3= 40
Thanks,
Russ