Shop OBEX P1 Docs P2 Docs Learn Events
RF Temp Transmission — Parallax Forums

RF Temp Transmission

LowtideLowtide Posts: 12
edited 2007-02-22 08:24 in BASIC Stamp
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

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-22 01:27
    Most data transmission is just a sequence of on/off transmission. What kind of transmitter/receiver are you using and how are you controlling them? Assuming you have a pin that controls transmission and the receiver on the other end puts out a HIGH/LOW signal, you would simply use SERIN and SEROUT at some low speed (2400 Baud is probably low enough) to control the transmitter/ decode the receiver. Once you have serial communication working, you can send decimal numbers with SEROUT and decode them with SERIN using the DEC formatters.
  • LowtideLowtide Posts: 12
    edited 2007-02-22 02:19
    Mike, I am using the Linx RF module transmitter/receiver and the Sensirion SHT11 sensor module. I'm just not getting the debug, so I can view the temperature.
    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?
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-02-22 02:29
    I see 2 different Baud rates between TX & RX. Why? Different Stamps?

    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
  • LowtideLowtide Posts: 12
    edited 2007-02-22 02:52
    I am using 2 different stamps
  • LowtideLowtide Posts: 12
    edited 2007-02-22 03:07
    I'm sorry guys, I am trying to understand this, but I am not getting a valid temp.

    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
  • FranklinFranklin Posts: 4,747
    edited 2007-02-22 03:30
    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
    
    

    So, where do you do anything with your serin input (if there actually is any)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • LowtideLowtide Posts: 12
    edited 2007-02-22 03:44
    i am trying to display it as a debug
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-02-22 04:17
    Ok, my fault there, with my example I used the variable 'temp' as in illustration.· You need to use your own actual variables.

    -Martin
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-02-22 08:24
    Lowtide -

    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
Sign In or Register to comment.