#Vote Machine
This project demonstrates how to connect a Raspberry Pi to the cloud. It turns your Raspberry Pi into an electronic voting booth. You decide what choices are on the ballot, then set up one or more Raspberry Pis to act as voting booths. The Pis send the votes to a central Redis Cache in the cloud, which you can create using Azure or other cloud providers.
For a detailed description of how to install and use the voting booth, see https://lexerhack.wordpress.com/2015/05/17/voting-booth/
##Installation:
Get pip if you don't already have it:
sudo curl https://bootstrap.pypa.io/get-pip.py | python
Install redis:
sudo pip install redis
Install matplotlib. On a Raspberry Pi, use apt-get rather than pip:
sudo apt-get install python-matplotlib
##Configuration:
Start by configuring a Redis Cache using Azure or your favourite cloud provider. Then, on each Raspberry Pi you want to use as a voting booth:
- Edit the
host
andpassword
entries inconfig.json
so that they point to your server - Edit the
choices
entry to contain the choices you want on the ballot
##Running an election
Initialize the election (do this only once):
python initelection.py
Start a voting booth:
python vote.py
Display election results in a bar chart:
python results.py