Serin sx28
I need two pass to variables to an SX28 via SERIN. I'm using a bluetooth module so I only have one RX. The variables I know can only be one byte at a time so I can have the value of the variables be between 0 and 255 , not a problem. I just need a solution that the SX28 will know the difference between the two variables. Any ideas?
Thanks,
Adam
Thanks,
Adam
Comments
· myVar1 = GETBYTE
· myVar2 = GETBYTE
Here's the code for the GETBYTE subroutine:
GETBYTE:
· SERIN Sio, Baud, temp1
· RETURN temp1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I am not familiar with "use subroutines like functions"
Is the end result that the subroutine is called and temp1 is returned to myVar1 and the same with myVar2?
Thank you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Here's the SX/B compiler output of a little test that shows the mechanics:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Post Edited (Jon Williams (Parallax)) : 7/12/2005 2:59:04 PM GMT