User avatar
tungfa
Gold Bitcoiner
Gold Bitcoiner
Posts: 1825
Joined: Mon Oct 05, 2015 5:09 am

Donate BTC of your choice to 19j972c9zC2Gg7VGdSt6ujkCqvo2EBtj63

Contact: Website Facebook Twitter Telegram

Dash announcing the Open Source release of dashvend! -- (the software that ran the miami soda machine) :

Wed Feb 10, 2016 7:32 am

Dash announcing the Open Source release of dashvend! -- (the software that ran the miami soda machine) :
https://bitcointalk.org/index.php?topic ... sg13833965

This repo contains everything needed to recreate the Miami "dash'n'drink" soda machine InstantX tech demo.

I'll be updating this repo occasionally as dash InstantX rpc support evolves.

# overview

Dashvend is a network-driven python script which:
- generates payment addresses
- masquerades as a local dashd peer (port 9999 communication)
- watches for transactions on the dash network to the next payment address
- refunds non-InstantX transactions and over/underpaid InstantX transactions
- counts masternode locks for passing transactions
- triggers two relays (sign light, product release) when the lock count meets a configurable threshold

# component overview

## dashvend

Code:
bin/dashvend.py - top-level script
bin/dashvend/config.py - system configuration variables
bin/dashvend/dash_ix.py - InstantX processing
bin/dashvend/dash_p2p.py - dash node peer connection
bin/dashvend/dash.py - python-bitcoinlib compatibility monkey-patch
bin/dashvend/dashrpc.py - dashd rpc communication (refunds, balances)
bin/dashvend/display.py - display controller (setuid bash wrapper)
bin/dashvend/trigger.py - relay controller (setuid bash wrapper)
bin/dashvend/vend.py - main application

## helpers

Code:
bin/_install_dashd.sh - fresh install - Makefile utility
/etc/init.d/dashvend - starts dashd/dashvend on boot/shutdown
bin/_dashvend_control.sh - called by above, starts/stops screen processes
bin/dashvend_screens.screenrc - gnu screen config file for above
bin/trigger_relay - setuid script, calls .sh file below
bin/trigger_relay.sh - run as root, triggers gpio pins
display/show_image - setuid script, calls .sh file below
display/show_image.sh - run as root, invokes fbi to display image
display/show_screen_number.sh - screen image builder, uses imagemagic
display/source_images/ - source images for above


There are a lot of moving parts, so take the time to read the entire README.md if you feel like trying this out.

If you plan on developing for a real-world point of sale system, use faster hardware.
The rpi2 is just too slow (startup time in particular) for anything more than a demo.

Feel free to ask me any questions at: moocowmoo@dash.org

Return to “Dash”

Who is online

Users browsing this forum: No registered users and 1 guest