Controlling a robot via the internet

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.

Interesting stuff!

Add a Blackfin camera to that robot! Have you played with RoboRealm?

Looking forward to seeing what you come up with!
Alan KM6VV

I haven’t used RoboRealm but I’ve been to the site
roborealm.com/
and I’ve seen posts where others have used it like in the code from FloBotX.
viewtopic.php?f=8&t=4397

I have used the blob recognition in MSRS and that actually worked well. Learning curve on MSRS is steep though and setup is a real pain. They should just bake it into the .net framework. They are starting to bake in the reading of sensors so that’s a good thing. I just hope they keep going in that direction.
windowsteamblog.com/blogs/develo … tform.aspx
I was thinking about writing drivers for the BAP for various sensors that I’m hooking up to it.
channel9.msdn.com/posts/yochay/W … rs-Part-1/

I’ve been wanting to get a camera that would stream the video through a com port. I’ve had my eye on the Blackfin camera for a long time. I’d be curious how others like it. I just haven’t pulled the trigger and purchased one yet.
surveyor-corporation.stores.yaho … lcawi.html

Hi, I made …

Very nice job! Is the code available for download?