long distance communication
dwbowen
Posts: 30
Hey All,
I am attempting to create two devices that will communicate over a long distance in·realtime·over the internet.
I think I can do this by using two pink netburners each connected to a basic stamp. At this point the data only needs to go one way from one basic stamp to the other. I have done this on a much smaller scale (throughout a building) http://www.dwbowen.com/remoteIR.html·using phone wire and serial communication between two basic stamps with the following codes
sender:
'{$STAMP BS2}
·counter· VAR·· Nib
·l_values· VAR· Byte
·r_values· VAR· Byte
·u_values· VAR· Byte
·d_values· VAR· Byte
·IR_freq· VAR· Word
·OUTPUT 3
·OUTPUT 9
·OUTPUT 5
·OUTPUT 7
·HIGH 12
·HIGH 13
·HIGH 14
·HIGH 15
·main:
· FOR counter = 0 TO 8
· LOOKUP counter,[noparse][[/noparse]39500,40000,40500,41000,41500], IR_freq
· FREQOUT 5,1, IR_freq
· r_values.LOWBIT(counter) = ~IN6
· FREQOUT 7,1, IR_freq
· l_values.LOWBIT(counter) = ~IN8
· FREQOUT 9,1, IR_freq
· d_values.LOWBIT(counter) = ~IN10
· FREQOUT 3,1, IR_freq
· u_values.LOWBIT(counter) = ~IN4
· PULSOUT 13, r_values * 75
· PULSOUT 12, u_values * 75
· PULSOUT 14, l_values * 75
· PULSOUT 15, d_values * 75
· GOSUB transmit
transmit
··· SEROUT 1/0 , 16468, [noparse][[/noparse]r_values,d_values,l_values,u_values]
··· PAUSE 1
NEXT
··· PAUSE 1
RETURN
receiver:
'{$STAMP BS2}
·r_values· VAR· Byte
·l_values· VAR· Byte
·d_values· VAR· Byte
·u_values· VAR· Byte
Main:
· SERIN 1/0 , 16468, [noparse][[/noparse]r_values,d_values,l_values,u_values]
· PULSOUT 13, (l_values)+720-(r_values)
· PAUSE 10
· PULSOUT 12, (d_values)+750-(u_values/2)
· PAUSE 10
GOTO Main
Does anyone have an idea how I could adapt these codes to use with the pink netburner?
cheers!
I am attempting to create two devices that will communicate over a long distance in·realtime·over the internet.
I think I can do this by using two pink netburners each connected to a basic stamp. At this point the data only needs to go one way from one basic stamp to the other. I have done this on a much smaller scale (throughout a building) http://www.dwbowen.com/remoteIR.html·using phone wire and serial communication between two basic stamps with the following codes
sender:
'{$STAMP BS2}
·counter· VAR·· Nib
·l_values· VAR· Byte
·r_values· VAR· Byte
·u_values· VAR· Byte
·d_values· VAR· Byte
·IR_freq· VAR· Word
·OUTPUT 3
·OUTPUT 9
·OUTPUT 5
·OUTPUT 7
·HIGH 12
·HIGH 13
·HIGH 14
·HIGH 15
·main:
· FOR counter = 0 TO 8
· LOOKUP counter,[noparse][[/noparse]39500,40000,40500,41000,41500], IR_freq
· FREQOUT 5,1, IR_freq
· r_values.LOWBIT(counter) = ~IN6
· FREQOUT 7,1, IR_freq
· l_values.LOWBIT(counter) = ~IN8
· FREQOUT 9,1, IR_freq
· d_values.LOWBIT(counter) = ~IN10
· FREQOUT 3,1, IR_freq
· u_values.LOWBIT(counter) = ~IN4
· PULSOUT 13, r_values * 75
· PULSOUT 12, u_values * 75
· PULSOUT 14, l_values * 75
· PULSOUT 15, d_values * 75
· GOSUB transmit
transmit
··· SEROUT 1/0 , 16468, [noparse][[/noparse]r_values,d_values,l_values,u_values]
··· PAUSE 1
NEXT
··· PAUSE 1
RETURN
receiver:
'{$STAMP BS2}
·r_values· VAR· Byte
·l_values· VAR· Byte
·d_values· VAR· Byte
·u_values· VAR· Byte
Main:
· SERIN 1/0 , 16468, [noparse][[/noparse]r_values,d_values,l_values,u_values]
· PULSOUT 13, (l_values)+720-(r_values)
· PAUSE 10
· PULSOUT 12, (d_values)+750-(u_values/2)
· PAUSE 10
GOTO Main
Does anyone have an idea how I could adapt these codes to use with the pink netburner?
cheers!
Comments