This project was built for toggling LEDs via I2C bus. By default it builds for ATmega8. But you can use any Atmel 8-bit microcontrollers.
It is somewhat based on an existing library found here: https://github.com/thegouger/avr-i2c-slave
To compile and flash:
make load