RF Temp Transmission
Lowtide
Posts: 12
I am trying to send a temperature reading from on BOE to another BOE. I can connect the 2 and send on off commands, but I can't (four days now) seem to figure ou thow to send the temp data. Any ideas?
Comments
The transmit:
PULSOUT 8, 30000
PAUSE 1
SEROUT 8, 16624, [noparse][[/noparse] "!&"]
The Receive:
DEBUG "Raw Data Temp: "
SERIN 7, 16468, [noparse][[/noparse]WAIT("!&")]
DEBUG DEC soT, ClrRt, CR
tF=soT**11796-400
DEBUG DEC (tF/10),".",DEC1 tF,degsym,clrRt,CR
DEBUG CLS
Any ideas?
Also, you neither send nor recieve any actual data:
SEROUT 8 , 16624,[noparse][[/noparse]"!&", DEC temp,CR]
SERIN 7, 16468, [noparse][[/noparse]WAIT("!&"), DEC temp]
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
DEBUG "Raw Data Temp: "
SERIN 7, 16468, [noparse][[/noparse]WAIT(temp), DEC temp]
DEBUG DEC (tF/10),".",DEC1 tF,degsym,clrRt,CR
tF=soT**11796-400
DEBUG DEC soT, ClrRt, CR
DEBUG MoveTo, 0, 3
DEBUG "Raw Data Temp: "
DEBUG DEC soT, ClrRt, CR
tF=soT**11796-400
DEBUG DEC (tF/10),".",DEC1 tF,degsym,clrRt,CR
SEROUT 8 , 16624,[noparse][[/noparse]"!&", DEC temp,CR]
PULSOUT 8, 30000
So, where do you do anything with your serin input (if there actually is any)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
-Martin
It would be nice to see the whole program, including the definitions of the variables. I suspect you'll need to send the data as bytes, and not as words. The way you dothat is as follows:
SEROUT OutPin, Baud, [noparse][[/noparse]temp.highbyte, temp.lowbyte]
- - - -
BTW, thie following line of code doesn't make a lot of sense to me. What were you trying to do?
<!--StartFragment -->SERIN 7, 16468, [noparse][[/noparse]WAIT(temp), DEC temp]
You're waiting on a data string which doesn't yet exist????
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 2/22/2007 8:29:55 AM GMT