Monday, January 14, 2013

Johnny Talks to The Web

****N.O.V.A******
===============
Hello From Johnny5
===============
****S.A.I.N.T.*****
 
The First thing Johnny 5's Mind has to do is be able to communicate with the outside world. So I set forth the quest by hooking up the Raspberry Pi to the Internet. Now, this was by no means an easy task, as I have only wireless in my office and by default, the Pi didn't accept my wlan0 device on debian. Sure, I could have hooked it up in the room with the router, but there is no TV in there, and therefore no way for me to easily use that as a viable development system for the robotic mind.
 
Instead, I use a bridged network to bunny hop the connection to the interweb. Now, there are many ways you can do this. One is buying an adapter, the other is more cost-effiecient and involves a little knowledge of networking. Don't worry though, it's pretty painless if you attempt it.
 
 
Basically, if you have a laptop with a wireless card and an Ethernet port, it can be done. I'm using Windows, so all I had to do is go into the control panel, network and sharing center, then click both my wireless card (or Badass Antenna with wifi adapter in my case) and the wired eth0 connection and hit "Bridge Connections" in Windows 8. After a little electrical software switch, the cable is rocking on Pi.
 
This also serves a dual purpose, as when using more advanced interfaces like puTTY or FTP or something, it makes it super simple to transfer stuff to my laptop.
 
Since the Pi's already fired up, the next step is to start installing software, so you can actually do something beyond playing python games.
 
so in LX, type: #sudo apt-get install arduino
 
this will install arduino off the hub because we're going to be needing it to serial/power the arduino and control the motors and 2 servos in autonomous mode, as well as reading from the analog sensors on J5.
 
once that is done, (it does take a while because it installs some java), it's ready to code.
 
I was looking at some other ways of doing this, like using the GIPO with a Gertboard to directly link to the arduino and if you want to know more about that, take a look at this link. but after a quick pin count, I realized that it wasn't a solution that I could use for this experiment due to battery balancing.
 
Now, that Arduino was setup, I proceeded to install Apache PHP and MySQL to handle all of the web stuff that johnny was going to write to following the tutorial found here.
 
Now, Johnny was ready to talk to the web.
 
I think changed his background picture to this picture made by ScooterAK022 on deviant art because I thought it looked awesome.
 
 
Creative Commons Credit: Gerrit Dalman 
 


No comments:

Post a Comment