Features we want to create (that take substantial work):
support for ID cards, so players can use metro cards or student ID cards in games (probably using RFID)
identity tracking -- so we can leave messages for person, etc.
sending SMS messages -- probably via Twilio APIs
validating player identity by texting them a code to enter
remote event trigger -- for example, FTP a file to the Pi in a set directory "remote-events/event-2016-02-08-ringphone.now" --> checks this directory 1 time per second, triggers event, then moves file to subdirectory when done.
Small snippets and short-term projects for general utility:
logging usage -- e.g., every time handset is hung up, the system adds a line to a logfile (ideally a single CSV for all games/activities, and that indicates which activity, e.g,. "2016-03-02,23.04,game4SankofaSaysV1.0")
a key-value system.
perhaps simply using filenames. This could be neat to implement. Each collection would simply get its own directory. For example, if we wanted to look up player NAMES based on their ID, then it might work like this: (1) create a directory for the files -- something like "keydir-PlayerNamesForID"... then (2) create a text file for each pair; so if the ID is 20972 and the name is "JIM-JONES", we just create this file: "playerNamesForID/key.20972.value.JIM-JONES"... and (3) the file itself can either have dummy text or if we actually want more in depth information, we can store logs or whatever.
place to store code... it's so simple we might just use dropbox... or we could use github???
feature1: to register a phone number, and confirm by SMS (Eleanor)
Setup with Payphone
Raspberry Pi must be connected to internet (either ethernet or wifi). Raspberry Pi must also have keyboard, external monitor/HDMI, power supply, and SD Card/SD Microchip with the python program "capstone-demoOPEN.py" installed.
Connect Raspberry Pi to phone via GPIO ribbon.
Turn on Raspberry Pi by connecting it to a power source.
In the command line, make sure you are in the "pi" directory. Type "sudo python capstone-demoOPEN.py"
The Python program should execute on loop
User Flow
Pick up the payphone
Listen to prompt
Enter cell phone number
Phone number is posted to PHP "playfulcity.net...." and Twillio is called
Receive confirmation text message from payphone Twillio account signifying successful registration (message is pre-programmed via linked OpenVBX account)
Bugs
Potential hardware problem with number keypad press? Or code internal binary problems with GPIO pin processing.
Once all bugs are addressed, set up Raspberry Pi to run this program on boot, therefore excluding the need for an external monitor, keyboard, and mouse.
feature2: to recognize student ID card (Eleanor)
If the user taps an ID card to the ID card reader, the card's 10-digit number will be registered. Next step would be to connect ID card numbers to phone numbers.
How to -- basic setup
directory setup:
"activities" are stored in the base directory of: "/home/pi/payphone/" ... for example, a game main file might be: "/home/pi/payphone/the-message-game/message-game-v1a.py"
generally, audio files just for that game are stored in a subdirectory for that activity... as is any logging specific to that project. The goal is to be able to FTP the activity from one directory (or TAR) and transfer it to a different phone.
for remote access to the Raspberry Pi, we are currently using weaved.com for remote SSH access for FTP and VPN
Creating content
audio files should be WAV files, converted to mono, and i think 128 kbps... if this is wrong, your sound file might play at the wrong speed or too slowly... but we might have to figure these out by trial and error...
How to send an SMS (and generally connect to Twilio)
Twilio is a cloud-based phone backend with some great APIs.
Overview
This handset activity system is...Projects for testing or demo:
Features we want to create (that take substantial work):
Small snippets and short-term projects for general utility:
feature1: to register a phone number, and confirm by SMS (Eleanor)
feature2: to recognize student ID card (Eleanor)
How to -- basic setup
Creating content
How to send an SMS (and generally connect to Twilio)