Garden Railroad controlled with a #RaspberryPi and Wixels / @Raspberry_Pi

Martin Sant has been developing a way to control the points in a garden railroad such that he can use an Android app to determine the route a train will take. I’ll let him describe the set-up:

“The technology behind this is based on the Raspberry Pi, which can be configured as a web server and the Wixel, which is a small wireless microprocessor board from Pololu. The web server will serve up HTML5 pages to the tablet and then communicate with a master Wixel that can control up to 64 slave Wixels. Each slave can be programmed to control 6 R/C style hobby servos which, with some waterproofing and an enclosure, I was planning to use to actuate my turnouts. Oh yeah, each slave can also send back 3 analog inputs and 2 has two more digital i/o pins.”

His plan is to make the whole thing waterproof so that it will survive being outside in the garden.

For more details, please read the Railroad Wixels page at MartinSant.net.

 

Need a quick HTTP server? Try Python on the #RaspberryPi

If you need to start up a quick-and-dirty HTTP server on the Pi, try the following at the command prompt:

python -m SimpleHTTPServer 8000

This will start up a server on port 8000. You can only server HTML pages without further work, but if you just want to stick something up quick, it’s a simple method.

You can also start up a server programmatically within Python:

import SimpleHTTPServer
import SocketServer

PORT = 8000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()