Face(book)2 is a physical manifestation of Facebook -- literally, Facebook inside of a book.

Created with Jeremy Blum at Facebook Summer of Hack NYC, it allows you to read & interact with Facebook inside of a hollowed-out textbook. Using an Arduino Mega, a pair of XBee RF transceivers, and a bunch of miscellaneous electronics, you can browse through your news feed, view posts & comments, and "like" stories.

At the beginning of the hackathon, we didn't really know what we wanted to make, other than something involving hardware. Although I've worked on software projects at hackathons before, I really love working with electronics and building things with my hands. So Jeremy and I lugged huge duffel bags full of random electronics to Facebook's NYC headquarters and got to work.

Once we planned out the idea, we spent a while searching in Barnes & Noble for a book that was suitably large to fit all the electronics inside. We then set to work building the project, starting with writing a wrapper for the Facebook Open Graph API for the Arduino. In Python, using fbconsole, a stationary computer communicates with Facebook and sends data over a serial connection using a limited communication protocol that we devised.

Since we're limited by the size of the serial buffer, we took the time to format everything for display on a few character LCDs in Python. The Python script also handles a simple state machine, meaning that the Arduino can simply send commands like ".n" (for "next") and the computer will return the appropriate posts, knowing where the previous posts were cut off by the displays.

We also spent a while devising a method to display profile pictures on a Nokia LCD from Adafruit, from the hackNY hardware workshop I ran earlier this summer. It turns out it's easy to get profile picture thumbnails that are the right size, but formatting it properly was a lot of work -- using the Python Image library, the picture is converted to monochrome, then carefully written out as a string of bits which the Arduino interprets using the Adafruit Graphics Library. It turns out that converting a bitmap to a suitable character array is not easy to do on the fly -- there's desktop software that does this well, but it's a pain to implement for something dynamic like profile pictures.

We used an accelerometer, also from Adafruit, to allow scrolling by turning the cover of the book. Once the angle of the cover crosses a certain threshold, a "scroll" command is sent from the Arduino to the computer. A few buttons were attached -- one to let you click on each post, one to return to the home screen, and a dedicated "like" button. In addition, we used a limit switch to detect when the book was opened or closed.


More Information

View schematics and code on Github
View Hackaday writeup
View Jeremy's blog post