For my Raspberry PI based car-radio that lives in the housing of a blaupunkt radio from the sixties I needed to interface a variable resistor from my pi. Unfortunately the rapsberry pi has no ADC for the GPIO pins so I added a small ATTiny running the arduino-tiny firmware to read the analog values. The ATTiny is programmed as a I2C slave and is accessed in the same way as the radio part of the project.
you can find a tutorial on how to install and run the arduino-tiny firmware here
and you can find the I2C slave library for the attiny chips here
this is my day 18 project for 30daysofcreativity
read more ...