This is an example of an application that can read data from a serial port and send the data to another computer anywhere else in the world via the internet. It’s a common technique that you see used in chat applications only this sends the serial port data instead of words that you type.
In this example I’m reading from a Passive Infrared Motion Sensor that detects any motion in a room up to twenty feet.
viewtopic.php?f=4&t=6189
The idea is that we would set this up in a house and then monitor it from a remote computer and see if we can detect anyone that might be walking around. If so we might want to then turn on cameras, send pictures, or remotely control our robot to further check things out.
This is the code for the Passive Infrared Motion Sensor attached to our Bot Board II running a basic atom pro processor.
hldpin1 var word
counter var word
prev_hldpin1 var word
FOR counter = 40 TO 0 ' Wait 40 Seconds For PIR Warm-Up
PAUSE 1000 ' Display Counter Every Second
NEXT
Main:
hldpin1 = IN4 ' Display Status Of P4.
if hldpin1 <> prev_hldpin1 then 'only send if value has changed
serout S_OUT, i9600, [dec hldpin1, 13] 'output to com port
prev_hldpin1 = hldpin1
endif
PAUSE 100 ' Small Delay
if hldpin1 = 1 then
gosub pirnoise
endif
goto main ' Repeat Forever
pirnoise:
sound P9,[10\1046.502]
low P9
return
This is a screen shot of the data being read into the com port and being sent to another computer at another location. The zero means no motion. The one means motion was detected.
http://www.otherrobots.com/lynxmotion/clientServer.jpg
This is currently a proof of concept. The code is definitely in an alpha phase but it does work. Eventually I’m going to modify it to operate a Phoenix remotely. The com port software I’m using is the same software that Flowbox already has implemented in his Hexapod Control program based on Xan’s code.
viewtopic.php?f=8&t=4397
When it’s done you’ll be able to run Flowbox’s code on the computer controlling the Phoenix or remotely from another computer anywhere in the world via the internet. If this works as planned you’ll be able to operate the Phoenix from either computer at the same time in real time. I’m posting this now to get people thinking about it. I’m not sure if I’m going to have anytime to work on this in the near future so if anyone wants to run with it…
If there is interest I’ll post the code that I have so far.