Thanks to work by Andre Moehl on *uino Mini Super (Atmega328PB) project on hackaday.To use the SPI communication, please see the. The Arduino software includes a Wire library to simplify use of the I2C bus see the.
*/ int led = 0 int led1 = 1 int led2 = 2 int led3 = 3 int led4 = 5 int led5 = 6 int led6 = 9 int led7 = 10 int led8 = 11 int brightness = 0 // how bright the LED is int fadeAmount = 5 // how many points to fade the LED by // the setup routine runs once when you press reset: void setup ( ) // wait for 30 milliseconds to see the dimming effect The Atmega168P also supports I2C (TWI) and SPI communication. Leds are connected to all the 9 pins as shown.