Add i2c code

Code from http://homepage.hispeed.ch/peterfleury/avr-software.html