Fortune cookie

Eric, Julian, and I came up with a different kind of love-machine. We attached a magnetic contact switch onto two halves of a giant fortune cookie. The idea is that the person has to “crack” open the cookie (this turns the switch off) which then prints in the serial monitor the predicted time (in minutes) until he/she meets his/her soulmate.

We came up with the metaphor thinking that it would be a simple and straightforward yet delightful experience.

Before experimenting with the physical interface (the cookie), we set up the circuits following this tutorial that walks through how to monitor the opening of a typically closed door. It didn’t work the first couple of times as we found that:

  1. The Arduino UNO (used in the guide) produced 5V instead of the ESP8266’s 3.3V… meaning, we had to substitute the recommended 10kΩ resistor with a 220Ω one.
  2. We had to rely on our instincts to make sense of the guide (pin numbers and all) in terms of our microcontroller model.

We attempted using a while loop and a higher-level if statement to stop the loop from running once the cookie’s been cracked open so that it only gives one prediction per person. Both didn’t work so, for now, we increased the delay after the loop so that Arduino doesn’t keep spitting out random predictions.

We designed the switch so that it at least looked like a fortune cookie. Its physical appearance would serve as the cue to its operation. The line printed in the serial monitor that reads: ‘Open the fortune cookie’ and the fortune cookie-looking fortune cookie were signifiers. The size of the cookie allowed for deep holes on each side on which the user could grasp onto. The cookie’s holes afforded gripping and pulling apart. We also stuffed the pocket with tissue and enclosed in some egg carton cells under each half to keep the user’s thumb from going too deep into the cookie which makes it harder to pull apart. By doing this, we designed constraints to limit mistakes that our users could commit.


To keep the two halves ‘stuck’ like a complete fortune cookie, we glued velcro patches where they should be connected in its pre-cracked state.