A Web-enabled party hat.
An example of a meteor app that connects to an Arduino. Originally created for a workshop at the Numbers That Matter hackathon.
If you're using a Linux based or OSX system, follow the instructions below. If you're using a Window system, install Ubuntu, then follow the instructions below. If you're using another system, try the instructions below and let me know how it goes.
This has been tested with an Arduino Uno with StandardFirmata installed. To
install StandardFirmata using the Arduino IDE, go to File -> Examples -> Firmata -> StandardFirmata
.
-
Ensure you have the following programs installed. You may use your system's package manager (preferred) of retrieve them from the Web.
-
A POSIX compliant shell, e.g., bash (you almost certainly have one already).
-
cURL (you probably already have this).
-
virtualenv for Python 2.7
-
-
Clone the Party hat repository.
$ git clone https://github.com/foxdog-studios/party-hat.git
-
Change your working directory to be the repository.
$ cd party-hat
-
Run the setup script. This will install Meteor, create a Python 2.7 virtual environment and install the required Python packages.
$ ./setup.sh
-
Launch the controller website by running;
$ cd webapp $ meteor
from the root of the repository.
-
Connect an Arduino board to your system and find it's device path. On my system, this can be done by running;
$ ls /dev/ttyACM* /dev/ttyACM0
-
Launch the hat controller by run;
$ . venv/bin/activate $ python hat_controller.py $DEVICE_PATH
from the root of the repository. Replace
$DEVICE_PATH
with the path you found in step 2. -
Finally, launch a browser and navigate to
http://localhost:3000
.