Welcome To the xMasPi


Someone else has control...

In use for: {{timerString}}

Control Time: {{timerString}}

Mode:

Speed


About

A Raspberry Pi and Arduino Recipe

SO many changes this year! As per usual I wanted to have a go with something new instead of just improving what was there. I rewrote the arduino sketch and made the serial protocol between it and the Raspi a little more robust so I was able to remove the harware interrupt that was being used a shortcut to break patterns last year. The Raspi web server is now running NodeJS instead of CherryPy which matches the new website. THe old .NET website front and backend have been ported to NodeJS and moved from Azure to AmazonS3, a huge improvement! More info below as I get time :P

  • Raspi

    Running a simple NodeJS Express webserver it provides the network layer to the hardware on the tree. The webserver exposes a route for accepts commands and another for checking the status. Command routes are forwarded to the arduino over the Raspi's USB port using the NodeJS SerialPort library

  • Arduino

    These guys control the hardware. I am using Arduino Uno's as the onboard USB makes it easy to connect them to the Pi. They run a simple a simple sketch that splits up a command seperated command string and issues the commands to the hardware. In previous years I used just the one Arduino however I didn't like the little delays that occured in the patterns while the train commands where being read. I probably could have written better code but hey, its Christmas! :P

Contact Us

If you have an questions or comments.