3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

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

Step 5Software and Projects

Software and Projects
«
  • testrig1.jpg
  • testrig2.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).
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
2
Author:pburgess