Website to microcontroller
lboucher
Posts: 139
Hi All
So I have a website.
Now i want to send data from website to my home computer, and ultimately to a microcontroller.
No real project yet, just want to learn how to do this.
Currently using wordpress for the website.
So anybody know a good tutorial about how to send tcp and or udp data from a website to a home computer?
Thanks
Lucas
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Animated Christmas Light Show
www.pachristmas.com
So I have a website.
Now i want to send data from website to my home computer, and ultimately to a microcontroller.
No real project yet, just want to learn how to do this.
Currently using wordpress for the website.
So anybody know a good tutorial about how to send tcp and or udp data from a website to a home computer?
Thanks
Lucas
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Animated Christmas Light Show
www.pachristmas.com
Comments
http://www.pair.com/services/web_hosting/
If you have a UNIX server and they allow you to create Perl scripts, then following is a search for Perl tcp...
http://www.altavista.com/web/results?itag=ody&q=perl+tcp&kgs=1&kls=0
Then so far as data, the above web servers·also have mysql which is a database.·Web scripts for that (cgi) can also be written in Perl.
As to writing the sql scripts for mysql, you can "cheat" with Microsoft Access (open office?) and create a query, then switch to "sql view" and it will have written the sql for you! (One less thing to learn). You can also use MS Access as a "front end" via ODBC to connect to the website database. I don't know if the open office db has this capability or not?
All the above·takes a *lot* of reading/learning....
I have worked around/with perl before, but never actually tried to write something from scratch with it.
I might go that route, but in the meantime i found an article on Microsoft Visual Web Developer.
Since i already know a fair amount of C#, this is looking rather enticing.
Anybody have any thoughts/comments, if not i will report back my findings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Animated Christmas Light Show
www.pachristmas.com
Parallax and I are working on a Propeller powered ethernet device. The product is a couple months out from being ready. This weekend I hope to return to working on drviers for the project.
Anyway, with something an like ethernet port on your micro you might be able to skip the home computer. Using a fixed home IP or dynamic DNS your webserver could send the data directly to the mirco. Another option would be to have the micro ping the web server every so often and pick up the data it needs, this may alleviate having to code something on your web server to send data to your home.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
My current idea actually necesitates* the computer
And due to the Real Time nature of my idea, that just formed yesterday, i think i need the web server to contact the micro in real time.
Anyways, the cloud of ideas is still conjelling*, will post the final project when done.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Animated Christmas Light Show
www.pachristmas.com
Be advised, there always are delays involve over the internet. Real time control in the US from here in Taiwan is not very realistic.(There was a guy with a robotic tank control on the internet and the delays were too much for me to properly operated the tank.) There are also websites that allow you to test for delays between your ISPN and other locations throughout the globe. (Ubuntu Linux will also run tests to and from specific sites and much more helpful about this than M$ Windows - the utilities software is all free.) From Taiwan, my slowest communications are with Europe and they are extremely slow. But anything outside of Taiwan is a mere fraction of the service that I am supposedly paying for (maybe 1m tops when I pay for 8m of bandwidth).
In sum, even with the right hardware, you still need to have the right service in place to implement these kinds of applications. And if your application can be designed to be tolerant of delays, all the better.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 6/27/2010 9:05:47 AM GMT
I am not sure if I am on target here but think about what we are doing when we are reading this forum topic.
We are simply doing a TCP/IP GET to forums.parallax.com/forums on port 80 which you can actually do using a telnet program. So if you want to send TCP/IP packets to your computer you can do a GET on a web page of data. To set this up you would need the formatted page available on your host and a small client task written in Java or pearl or anything else which does the HTTP GET and stores the data somewhere.
You can also choose to have the host server make the connection to your computer maybe using a pearl script as others have mentioned. The Mail protocol is a good idea also because you do not have to have a hole in your firewall to receive the TCP/IP connection.
Avoid adding additional computers and complexity as much as possible. Remote websites love to stop working.
The following is a small snippet of code that grabs a weather page from NOAA written in Java that ran long ago on a TINI chip.
Good luck
Tim C