From Hack Manhattan Wiki
Jump to: navigation, search

It's time again for FIGMENT! Dates are June 6-7, location on Governor's Island. I've requested the same area we had last year, Nolan Park.

Project description: Participants will step into a booth and be greeted by a screen with a fortune teller's face. They'll activate the teller with a crystal ball and a fortune will be generated for them based on aspects of the photo.

Implementation details (ongoing): We'll reuse the booth from last year's FACETRON. The face will be displayed on an Adafruit 32x32 RGB LED matrix, and the brains of the system will be run on a Pi. The fortunes are generated by a Markov generator, read to the participant over headphones via text-to-speech, then printed out on our Brother label printer.

Volunteer list:

  • Justin (Sat + Sun, all day)
  • Dave (Sat all day)
  • John (Sat all day)

Plan for Maker Faire

Guan is coordinating.

  • Proximity sensors, ball, lights, eyes [Johnny]
  • Fortune generator: Try to seed it in a more meaningful way, for example by generating "positive" or "negative" fortunes. [John O'Brien]
  • Clothing [Annie]
  • 5V power @ 3A [Guan]
  • Display for fortunes, software on PC [John O'Brien]
  • Buttons [Guan]
  • Label PDF generation and printing [Guan]

Face is gone for now. Guan is still writing a driver for it.


List of user interface components

  • Eyes
  • Ultrasonic sensor
  • Label printer slot output
  • Display for fortune
  • Orb
  • Buttons for categories
  • Webcam



Basic assembly will consist of the following.

  • The teensy boards for the buttons, eyes, and distances sensors are all pre-wired and should be connected via USB to the Amazon USB hub.
  • The laptop should also be connected to the brother label printer and the web cam.
  • The hdmi display on the maniquinn should be powered by a kindle charger and connected to the laptop's hdmi output.
  • Speaker will requires a dedicated micro usb charager and connected to the laptop audio jack. It can be turned out with a physical switch.

Password for laptop is same as user name

After booting up laptop:

  • Run chrome ('chromium-browser')
  • Run Pycharm ('sh pycharm..../bin/').
  • In pycharm look at and make sure that all the hardware that is being plugged in is set as 'True'. Run
  • Open two tabs in chrome: for UI, for admin interface. Drag UI chrome window onto 2nd display and make full screen (F11)

Sequence for user should be:

  • Stepping in front of sensor causes greeting, makes eyes flash, stops the buttons from flashing
  • User picks a button, category is announced. Fortune and category appears on screen
  • If printing is set to auto label will be printed. Photo will be taken on webcam and tweeted to @FORTUNETRON7000 with fortune

Printing mode starts in manual, to make it auto click the radio button on right hand side of admin page

Admin page tracks the last 20 fortunes. These can be printed/reprinted or tweeted (without image) by clicking the button next to them

To create custom fortunes type into the box on the left hand side and click "add to list". You can then click on the "Use fortune" button to make that the next fortune that will be presented, regardless of category etc. You should click "use fortune" after the previous fortune has disappeared from the screen. Note that custom fortunes will be tweeted/printed if print mode is set to auto.

Things to Do for Makerfaire (2015-09-05)


We are using 16mm buttons with LEDs from Adafruit. They will be inserted into laser cut black acrylic panels, two buttons per panel with a category label above each.

The LEDs will be driven from a TLC5917.

We have enough pins on the Teensy LC that each button can have a separate pin without resorting to multiplexing.

We have the buttons, but are waiting for the associated wires with quick connect tabs.


Program face to animate when text to speech plays -This can be done with separate Pi's, so that the animation playing on the face is not interrupted.

Label Printer

Currently, there is no ARM driver for the label printer, which means the Raspi cannot print to it. Strangely enough, there *IS* an Android app for it...Somehow, we would like to be able to print without having to go through a PC.


Wire components to run from one outlet. At present mutliple USB adapters are required- one for face-pi, one for text-to-speech and fortunte generator pi, and one for Arduino/Teensy. Plus two plugs for laptop and printer, to print the fortunes. Two more plugs power the LEDs and the LED matrix which is the face.

Crystal Ball

There is a glass globe which we had been using as a crystal ball. It was supposed to be filled with RGB LEDs which flash at random, and indicate that FortunateTron is "thinking" (generating a fortune). The LEDs are outside, and it needs a new microcontroller and additional 5V power source. A Microchip MGC3130 was planned to be used with this setup.

Current connections coming out of LED chain are red, whiteA, whiteB, green. red should be connected 5v power independent from the arduino and the two whites should be connected to ground. The green connection should be connected to arduino's digital pin 6. The result is random blinking. Library used to drive the LED strip is FastLED, counted 50 LEDS on the strip.

LED chain is currently stuffed into the bottom of the crystal ball. Hope is to prop the leds inside the crystal ball using gardening wire. When the user placed their hand on top of the crystal ball, an IR photosensor will trigger the arduino code to increment the number of LEDS to turn on. The photo-receiver must use the voltage from the main arduino board since the teensy is too sporadic. It is working as of 2015-08-16.

Code can be found [1]


Make skeleton look like an actually fortune teller- currently needs lower forearms attached, possibly hands re-worked, and could use some clothing, maybe a paint job.

waist = 26 bust = 36

Annie drafted the clothing for the mannequin to the following items. It may be easier to use a really cheap clothing as a base and modify it considering the cost of fabric is so high. skirt (42 inches): possibly have geometric patterns. top with sleeves: since we currently have a sloppy duct tape cast arms, it'd would be best to hide it. hood: gives intrigue to the fortune teller and emphasizes the blindfolded leds more.

if long skirt top should be form fitted and hood should be shoulder length, otherwise: it looks like a cliche gypsy

Given how much easier it is to source dark color fabrics, we're thinking of sticking with a dark base with one color as an outline (think Tron with less lumens).

Pinterest board to share ideas for the look

We've decided that the fortunes would be printed from the chest so a giant hole was cut out from the back of the mannequin with a small slit across the collarbone.

Fortune generator

It is a second order Markov generator trained on a collection of 1,324 fortunes. Unfortunately that's not a lot, so there will be a lot of fortunes that are fully determined. In a collection of 100,000 generated fortunes, there are only 34,032 unique ones.


  • You will be selected for a day. Be patient.
  • You are the master of every situation.
  • Poverty is no disgrace.
  • Well-arranged time is in store for you. They will be blinded by passion.
  • The love of your destiny until you quit trying.
  • Laugh in the world.
  • Before the beginning of great brilliance, there must be chaos.
  • Your emotional currents are flowing powerfully now.
  • Today is the tomorrow we worried about yesterday
  • Determination is the politeness of kings and the lamp post.

Python Text To Speech:

  • sudo apt-get install espeak
  • sudo raspi-config (set audio to 3.5mm audio jack)
  • Use the following code for whatever script
 import os  

 def say(something):  
   os.system('espeak -ven+f2 "{0}"'.format(something))


FIGMENT 2015 HM Logistics

Bootup Sequence

username: pi password: 5am5ung

startx (opening consoles) cd rpi-rgb-XXXXXX/ sudo python cd ../FORTUNETRON7000 sudo python

every time a visitor presses enter, it should display the quote on the hdmi out and audibly play the fortune text. The quote on the display should close after 5 seconds and return to the console, awaiting the next user.

Known Issues

We were not able to have the face graphics display on the rgb matrix without slowing down fortune rendered down significantly.

If the fortune contains non ASCII characters like quotes or dashes, espeak will crash. To fix, close the rendered fortune and rerun the code

FIGMENT Event Info

In 2015, FIGMENT will be open to the public on Saturday and Sunday 6/7 June 2015 from 10 AM to 6PM each day.

Pictures from Saturday

Favorite moment was when a little girl and parents came up to the crystal ball and asked how it worked. Told her to put her hand over the crystal ball and press enter. Her response "Daddy, go first"

Load In List

We will need people to help bring the following items to Governor's Island so that we can set up and staff the HM exhibit successfully - please add to this list if you think of anything else we might want to have during the event, or anything that would improve the aesthetic of the exhibit as a whole.

  • Fortunetron 7000 structure, ball
  • Fortunetron clothes
  • Basic tools for structure/electronics repairs - Soldering irons, hot glue, etc)
  • Laptop
  • Gazebo
  • Table in a bag
  • Chairs or other seating (beach towel? tarp?)
  • Clipboard to collect emails for HM mailing/announcements list
  • Snacks/Drinking water
  • HM banner
  • cable ties/twine/duct tape
  • Power Extension cords (splitter+orange 50ft)