World's Cheapest I2C (I-Squared-C) Adapter by pburgess
Featured

Step 5: Software and Projects

testrig1.jpg
Mac OS X and Linux source code for working with the adapter can be downloaded from my web site (download link is at bottom of page). It's written in C, and you'll need to have gcc installed (Linux usually includes this by default, while Mac users will need to install the developer tools that are an optional installer on your original OS disc, or downloadable free from Apple). Example code is included for reading a temperature sensor, flashing a BlinkM "smart LED," writing and verifying a serial EEPROM, reading a Nintento Wii Nunchuk controller (Linux only), and communicating with a servo controller board.

Unfortunately this adapter scheme is not compatible with all systems. Support for DDC is not mandated, so not all video cards support this capability. I've had good luck thus far with Mac systems that have ATI or Intel graphics chips, but NVIDIA-based systems are out of luck. On the Linux side I've only successfully tested an IBM ThinkPad A31p (ATI graphics), but it would not work with an Asus EeePC (Intel).

The images here show a test rig that demonstrates various I2C devices in action. The computer continually reads the ambient temperature from an I2C temperature sensor, periodically logs this data to an I2C serial EEPROM chip (yes, it could just print to a file, but this was to further demonstrate I2C applications), and then a servo (through an I2C controller) serves as a makeshift indicator dial. With the library and sample code for these devices already in place, it only took a few minutes to put together this demo (and most of that was in making the indicator dial).
 
Remove these adsRemove these ads by Signing Up
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!