Here’s the first main project I’ve done with the Arduino — a project that visually shows the wait time for a given attraction at either Disneyland or Disney’s California Adventure. Maybe not the most useful project, but it was a good beginning step into having the arduino control physical objects, and getting external data into the Arduino. I’ve posted the code in the code section of this, but follow along for a walkthrough on how this went together.
This idea really came together as I was thinking about what to do, and found my old box of Knex and thought that might be fun to control some Knex projects via the Arduino. A lot of the designs are even supposed to move, only most of them are moved by manually turning a piece. As I was flipping through my book of designs I came across a small ferris wheel, which wasn’t originally designed to be driven by anything but wouldn’t take much modification to do so. I won’t post the plans for that, but from the photos you can probably figure it out. So I new I wanted to have the Arduino spin the ferris wheel and I had my ferris wheel built, now I just needed to get it to spin. I only had a small 180 degree servo which wouldn’t do the job, so I had to take a quick trip down to the local Frys to pick up something that would. After reading about Servos, DC Motors, and Stepped Motors, for this project and for my budget I decided to go with a small continuous servo. The continuous servo is similar to a standard 90 or 180 degree servo but with the exception that instead of sending the device a specific degree to go to, positive numbers make it spin in one direction, negative numbers in the other. The higher the number (in either direction) the faster is spins. Hooking this up to the Arduino was incredibly easy. The servo has three wires: Power (red), Ground (Black), and the yellow wire is used for sending your signal. Simply connect these up to your Arduino where the red wire is connected to the 5V port, the black wire is connected to the GND, and the yellow is connected to the port you’re communicating on (I used Digital 9). Check out this image below for a view of the breadboard.
That’s really all there is to wiring up the Arduino. Now there’s the softare to be loaded on it, but it’s pretty minimal. Basically, it receives an integer over serial and turns that into a speed for the servo which then turns the Ferris Wheel. You can check out all of the project code at https://github.com/stevenquinn/Disney-Wait.
The key to all of this is getting the data for the wait times, but where to get this? Disney doesn’t offer an API for this but after some digging online, I found some 3rd party APIs that are maintained from user reported wait times (https://www.reddit.com/r/Disneyland/comments/3070ld/disney_parks_wait_ti…). The API is pretty basic, and just returns a simple JSON encoded array. While this could have all been done on the Arduino using an ethernet shield, I didn’t feel like putting that much money into this project and opted for bringing in the data to the Arduino over USB/Serial. That means it has to be connected to a computer, but as a small project that didn’t seem like a big deal.
I ended up using Python for the computer side of things. I like Python, and PySerial (http://pyserial.sourceforge.net) seemed to work well at pushing data over USB/Serial to the Arduino. You can find the python file at https://github.com/stevenquinn/Disney-Wait but in a nutshell it fetches a list of the rides from Disneyland and DCA and presents it to the user, asking for them to choose a ride using an integer. Once the user does, it fetches the wait time for that ride via the API. The API just dumps it all at once, so it actually grabs all of the ride data and then parses through to find the correct wait time. Once it does, it formats it into the correct value for the Arduino to use, and passes it over USB/Serial.