Étape 2: Source Code
#include < LiquidCrystal.I2C.h >
#include < usi_twi_master.h >
#include < tinywirem.h >
//
Pour connecter votre afficheur I2C à votre ATtiny85, connecter les broches suivants :
//
ATtiny85 broche 1 -> NC
ATtiny85 broche 2 -> NC
ATtiny85 broche 3 -> NC
ATtiny85 Pin4 -> sol
ATtiny85 Pin5 -> LCD Sda
ATtiny85 Pin6 -> NC
ATtiny85 Pin7 -> LCD Scl
ATtiny85 Pin8 -> + 5V
//
LiquidCrystal_I2C lcd (0 x 27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE) ;
void setup()
{
LCD.Begin (16, 2) ;
3 introduction flash
pour (int i = 0; i < 3; i ++)
{
LCD.backlight() ;
Delay(150) ;
lcd.noBacklight() ;
Delay(150) ;
}
LCD.backlight() ;
lcd.setCursor (2, 0) ;
LCD.Print("Instructables") ;
lcd.setCursor (6, 1) ;
LCD.Print("...") ;
}
void loop()
{
}