Wowy wow wow that was tricky!
I just finished my fist excursion into networking… a place I have never really been before. So for Networked Objects, we are using a little devise called the Xport. It converts serial data to the ethernet protocal (what the internet speaks), what that means is: I can now make my pComp projects (sensors, microcontrollers, LEDs, etc) talk to to the internet. Which is good because the internet has a lot to say and many people are listening. This all probably sounds complicated and scary… and it is. Mostly, I think, because there is so much going on I cannot control. In typical pComp projects you can touch the wires, program the chip…. debug all that stuff. But when you start playing around on networks, you often cannot change anything (its in other people’s control) and its invisible-that makes debugging really hard.
BUT, I prevailed, and it wasn’t that bad. I mean, it took a looooong time to get everything running right, but it was a great process.
So this is what I made: I made a little flag connected to a servo motor that waves every time someone posts a comment to THIS blog entry. So if you post a comment to this entry, the flag will wave at my desk… happy. It is a simple concept, but a nice one. Something physical happens in my world when you do something physical in yours-even if you are in Texas, China, or where ever. The execution however is not simple. Heres a summary: Arduino microcontroller tells Xport “go check if anyone has posted a new comment,” Xport says “ok” and connects to the ITP server. Once the server is connected, the Xport gets a message saying “hey, your connected,” it then passes it on the Arduino who says, “ok, go get a php file on that server,” the Xport does so and comes back with how many posts are on the entry. The Arduino then decides if there has been a new post, if there has, it tells the servo motor “wave that flag”… and the servo does, and I smile. If there is not a new post, the Arduino says “oh, well lets wait a couple seconds and try again”. And that goes on forever until I unplug everything.Lots of bits to get broken in there, but it all works!So thats about it, if you want to make me smile, post a comment. |
|
|
thomas- you’re a genius!
I feel like I did when you were 14 years old and you were taking math classes I could not understand…can’t wait to talk with you more in detail about all of this
Hi Tom,
Enjoy your waving flag!
Did your project make any use of the 3 GPIO Pins on the XPORT?
I understand the protocol outlined in the XPort documentation but am having trouble with actually implementing GPIO control over the internet.
If you have any advice I would appreciate your input.
Cheers
Nope, I did not use any of the GPIO pins… just the two serial lines. I have never actually used the GPIO lines, serial seems to do everything I need. I just called a php script with a HTTP request using a micro controller through the Xport, then when the HTTP came back, my micro controller parsed the text and had a servo motor wave the flag. My code and schematic are up there if you want to know more.