Erste Spielerei mit Arduino

Nachdem ich mir jetzt auch mal ein Arduino gegönnt habe, meine erste Spielerei mit einem Display (Tc1602A-09)

hello-arduino-breadboard

hello-arduino-circuit

Der Code dazu:

#include 
LiquidCrystal lcd(9, 8, 6, 5, 4, 3);  //Digitale Pins an dem das Display angeschlossen ist
#define LCD_WIDTH 16                    //Anzahl Spalten des Display (16)
#define LCD_HEIGHT 2                    //Anzahl Zeilen des Display (2)

 
void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("Hallo, Arduino!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print("Ich laufe ");
  lcd.print(millis()/1000);
  lcd.print("s");
}
Dieser Beitrag wurde unter Arduino veröffentlicht. Setze ein Lesezeichen auf den Permalink.