Putting robotics at your service™

Free shipping on orders over $200

Controlling a robot via the internet

Print view Share :
Previous topicNext topic

Page 1 of 1 [ 6 posts ]

Veteran ( offline )
Posts: 206
Posted: 2010-04-14 23:08 
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.
Code:
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.

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.


User avatar
Guru ( offline )
Posts: 4118
Posted: 2010-04-15 14:07 
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

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Veteran ( offline )
Posts: 206
Posted: 2010-04-15 23:53 
KM6VV wrote:
Add a Blackfin camera to that robot! Have you played with RoboRealm?

I haven't used RoboRealm but I've been to the site
http://www.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.
http://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.
http://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.
http://surveyor-corporation.stores.yaho ... lcawi.html


User avatar
Veteran ( offline )
Posts: 147
Posted: 2011-02-28 21:27 
Hi, I made one 2 month ago with a EEE PC as server and a VB6 client.

An old caterpillar toy as base.
Audio/Video streaming like msn+ motion tracking+ blob detection move

[youtube]http://www.youtube.com/user/robotical1510#p/u/8/uCDuKvVOUI0[/youtube].


Attachment:
Presse-papiers-2.jpg
Presse-papiers-2.jpg [ 186.07 KiB | Viewed 1283 times ]
Attachment:
client2.jpg
client2.jpg [ 77.34 KiB | Viewed 1283 times ]
Attachment:
client.jpg
client.jpg [ 73.5 KiB | Viewed 1283 times ]
Attachment:
33833_1503396141821_1141748472_31041610_501210_n.jpg
33833_1503396141821_1141748472_31041610_501210_n.jpg [ 70.4 KiB | Viewed 1283 times ]
Attachment:
165304_1509740820434_1141748472_31051962_6429886_n.jpg
165304_1509740820434_1141748472_31051962_6429886_n.jpg [ 50.21 KiB | Viewed 1283 times ]

_________________
Self-Educated
I'm looking for job opportunities
[youtube]http://www.youtube.com/user/robotical1510[/youtube]
Veteran ( offline )
Posts: 206
Posted: 2011-03-02 21:45 
RoboticAl wrote:
Hi, I made one 2 month ago with a EEE PC as server and a VB6 client.

Very nice job! Is the code available for download?


User avatar
Veteran ( offline )
Posts: 147
Posted: 2011-03-09 21:27 
it's a dirty code :(

some bug exist and 3d view is disable.(Work In Progress)

truevision 3d will be added
i delete my ip address;)

include asm source code for pic16F84 (used for serial +max232).
include cli folder for client ===> projet1.vbp
include srv folder for server ===> projet1.vbp

sim file include. (command file saved)

Trigger two ports 2047 and 2048 and add your ip see frmclient (iphost)---> client and module1.bas ---> serveur


Attachment:
bot.zip [1.43 MiB]
Downloaded 87 times

_________________
Self-Educated
I'm looking for job opportunities
[youtube]http://www.youtube.com/user/robotical1510[/youtube]
 

All times are UTC - 5 hours [ DST ]. It is currently 2014-09-16 07:25
Feedback Form
Feedback Form