help for starting propeller with Parallax 433 MHz RF Transmitter and GPS
skybot
Posts: 14
Hi all,
I am a beginner for spin code and I am just starting to learn spin code.
What I want to do for my learning is·that reading GPS values and sending the GPS values to my pc via a 433 RF transmitter.
I have spin code sample for GPS but I do not have a code for the 433 RF Tx.
Does anyone know·a link to get the spin code for 433 RF Tx or have a sample spin code for 433 RF Tx?
Does anyone know how to capture·the live streams GPS data and pack data to Tx packet with spin code?
Please help me out.
Thank you.··
·
I am a beginner for spin code and I am just starting to learn spin code.
What I want to do for my learning is·that reading GPS values and sending the GPS values to my pc via a 433 RF transmitter.
I have spin code sample for GPS but I do not have a code for the 433 RF Tx.
Does anyone know·a link to get the spin code for 433 RF Tx or have a sample spin code for 433 RF Tx?
Does anyone know how to capture·the live streams GPS data and pack data to Tx packet with spin code?
Please help me out.
Thank you.··
·
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
There are a lot of things to send, but they're just bytes of data, and for the majority of GPS units, you're only getting one set of data per second. I put together a GPS/Parallax 433 transmitter on a BS2 stamp and a receiver with an LCD on a standard BS2 Homework Board last year, and it worked fine.
You understand that's two separate questions, right? You'll read the GPS data into variables on your Propeller. Make sure that you can do that reliably, simply displaying them on an LCD or other terminal (TV, VGA) before you mess with transmitting them. For example, this little snippet from the GPS Smartmode object reads the data for time into six variables. Make sure you can get them and display them:
Then separately learn to send and receive byte-at-a-time on the 433 units using one of the serial objects (SimpleSerial or FullDuplexSerial). I don't have the code here now, but I had that set up with a Propeller and a 433 transmitter to send the data from a Wii Nunchuck controller to a 433 receiver connected to a BS2 and an LCD screen - that also worked fine, and that was certainly more data than you'd expect to send from the GPS.
Post Edited (sylvie369) : 12/9/2008 1:37:33 PM GMT
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The Parallax 433 units, at least, take care of the modulation stuff transparently. You don't even have to think about that kind of thing. Here is the entire code for transmitting and receiving with BS2 (from the documentation: comments removed):
It's just a matter of SERIN and SEROUT. Similarly on the Propeller it'll be just a matter of using the serial objects properly - slightly easier than on the BS2, in fact, because there's none of that messing with mysterious code numbers to set your baud rate. On the BS2 you get 9600 baud with that "16468" (and with different Stamp models you use different numbers). With the Propeller, you get 9600 baud with "9600".
By the way, this code could be simpler if you were only sending one byte each time, as you would be with the GPS data. The demo code sends word-sized variables, one byte at a time (hence the "x.HIGHBYTE, x.LOWBYTE" stuff). If x and y were just one byte each, that'd say
SERIN 7, 16468, [noparse][[/noparse]WAIT("!"), x, y]
Post Edited (sylvie369) : 12/9/2008 1:49:46 PM GMT
I have a question about your code that what x.HIGHBYTE and x.LOWBYTE does?
What do HIGHBYTE and LOWBYTE mean?
I used your code but I am get strange data.
I am sending something like "-20 30 234" but getting them like "12343 13623 13332".
Do you have any idea for that?
Thank you for your help.
x var word
x = 515
in binary, 515 = 00000010 00000011,
so the HIGHBYTE (upper 8 bits) would be 00000010 and the LOWBYTE (lower 8 bits) would be 00000011.
Debug DEC x.HIGHBYTE gives you "2" (00000010)
Debug DEC x.LOWBYTE gives you "3" (00000011)
Debug DEC x gives you "515"
The 433 units can only send a byte at a time, so you send x.HIGHBYTE and then x.LOWBYTE - half of the number each time.
As for "using my code", first of all, that code is not mine, but just the code from the documentation for the 433 units. Second of all, I can't tell what the problem is without seeing the actual code you're using. Since this is a Stamp question, not a Propeller one, you might want to post the question with the code attached over in the Stamp forum.
Post Edited (sylvie369) : 12/10/2008 11:57:38 AM GMT