Candy Machine
IoT project, using a common Candy dispenser machine, which has been previously hacked, a Spark core (www.spark.io) and Braintree v.zero SDK.
Technology
Here you have a teaser video with the full demo, enjoy!
Working on a 2nd video demo.
Technology
Hardware used:
- Candy Machine
- Spark Core
- 2,2" TFT with SD
- CC motor 5V
- generic SD 1GB.
Server:
- Python: V.2.7.6.
- Django: Python web framework. V. 1.7.1.
- The Braintree Python SDK
- TweetPony
- spyrk API
Spark Core:
Running the server
- In the
server
folder - Run
pip install braintree
to install Braintree - Run
pip install spyrk
to install spyrk - Run
pip install tweetpony
to install tweetpony - Run
python manage.py runserver
to start the server
Running the application at Spark Core
It is strongly recommended to use Spark Dev IDE
- Deploy the "spark" folder on your local system.
- Add the following Credentials in order to use them:
- Braintree sandbox credentials
- Twitter Dev Credentials
- Spark Credentials
- Change the string to your Spark core name.
- Compile and upload the firmware to the core.
SD Configuration
- Copy the following images to the root path of your SD Card:
- btdev.bmp
- twitter.bmp
- motor.bmp
You can find them here: SDCardImages
Wiring the core
under construction
Testing the demo
- Open on a web browser the url "127.0.0.1:8000"
- Click on
Start Payment
- Select either of these payment methods:
- (PayPal)
- Fill in the following credentials:
- Email:
us-customer@commercefactory.org
- Password:
test1234
- Click
Agree
to accept future payments - (Credit Card)
- Fill in the following credentials:
- Number:
4111 1111 1111 1111
- Expiration date:
11/15
- CVV:
123
- Click on
Pay
- You will see a message that says "Subscription ID: [subscription_id]"
NOTE: If you add your twitter alias in the form, you'll receive a tweet from your spectacular Candy Machine's Twitter account.