Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h> // Biblioteca LCD standard
- //LiquidCrystal lcd(A0, A1, A2, A3, A4, A5); // Instancia e ports para conexao do LCD
- LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // Instancia e ports para conexao do LCD
- //----------------------------------------
- void setup()
- {
- Serial.begin(9600);
- lcd.begin(16, 2); // Inicialisa LCD
- // lcd.print("Testando LCD "); // Print
- // Serial.println("Testando Serial"); // Print
- float f = 123.12F;
- char str[50];
- sprintf(str, "Valor : %d.%02d", (int)f, (int)(f * 100) % 100);
- lcd.print(str); // Print
- delay(2000);
- }
- //----------------------------------------
- void loop()
- {
- ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement