Both the hardware and firmware for phatIO is Open Source.
phatIO is a computer IO (Input/Output) device which allows any computer that can write to files on a USB thumbdrive to interact with the real world.
This guide describes phatIO functionality and how to use it. New users should read this page and then the following.
On one side of phatIO is a USB Mini-B Connector to connect to a host computer, on the other a 28 pin socket.
phatIO exposes 5V, 3.3V and GND (0V) for powering external circuits and 20 general purpose 5 Volt IO pins numbered 0 through 19. More details can be read on the hardware page. A sticker is supplied to label the IO pins when used in prototyping or on a Breadboard.
There’s a detailed section about the different types of IO that can be done.
Once connected to your computer phatIO should appear as a filesystem (the exact name and location will depend on your computer). The phatIO filesystem has the following contents:
One issue with acting as a filesystem is that operating systems will often cache its content to improve performance. This means that once it’s read a phatIO file it doesn’t expect the contents to change on the device. This has most effect on reading the values of the “
pins/*” files when the pin is acting as an input (both digital and analog). Often the OS will cache the contents of the file so phatIO won’t be queried again.
Systems like linux can be told to destroy the cache and reread the contents of the file, but phatIO also provides a condition mechanism that allows something to be done when the analog/digital inputs change. An output pin could be set high to light an LED if the analog input on a pin goes above a specific value, or if a switch is pressed phatIO could simulate someone pressing a sequence of keys on a keyboard. Conditions are described in the guide.
As well as mapping single IO pins to files, phatIO provides a mechanism to add Unix like Device files. This allows a more complex or multipin device (a display, or chip for example) to be accessed through a file.
For example, a 4 digit 7-segment display, could be controlled by writing the number to display in text (“1234”, “8000” etc.) to its device file, with the phatIO device converting the text and controlling the display. The capabilities are limited at the present - this area is in active development.
Any heavy lifting should be done on your host computer with phatIO being used for interfacing. More details are described in the LIO section. There are also several examples showing devices files being used in the Ideas section.
As well as its own 20 IO pins, phatIO has been designed to be physically extended, in particular the bottom 14 pins are intended to be used for connecting extension boards, with both SPI and TWI (I2C) buses available. See the hardware section for more details.