Files of check-in [a0d8e25915]
in the top-level directory
sudoroom vending machine
The vending machine plays money sounds after you put money in.
I originally came upon this idea at Sudoroom on a Wednesday,
I think January 31, where some people were prototyping the system with
the Wizard of Oz technique.
The song plays clips of people saying different values of money.
Catalog these clips in the file "catalog" like so.
First, write the phrase "libexec/sample", then space,
then the identifier of a YouTube video (like "BVkTmnJkAN8"),
then the value of money that the clip will have ("1.05" for
libexec/sample BVkTmnJkAN8 1.05
Clips with a value of $0.00 are played periodically, without
solicitation, and at no cost.
Then run "./catalog" (or "make catalog"). This will download
the music and play it. Press "y" once when you want the clip to
start and once when you want it to end. A line will be written
to the end of the "catalog" file with the start and end points
in seconds, like this.
libexec/sample BVkTmnJkAN8 1.05 122 157
Edit the file "catalog" to confirm that it was written properly,
then delete the earlier line that lacks the cut points, like this.
libexec/sample _O2H1LEqDEY 0.10 93.2 96
libexec/sample _O2H1LEqDEY 2 10 17
If you want to make samples for two different values from the same clip, include
I installed pyserial.
apt-get install python3-serial # Debian
pkg_add py-serial # OpenBSD
On the vending machine, I put the files in /home/tlevine/sudo-vending, and then
I added this to my crontab.
For convenience I saved an appropriate rsync command for the "make upload"
Makefile target and added the following to the ~/.ssh/config on my own computer.
The bill acceptor interface is documented in doc/bill-acceptor.html.