avatar

ptb2

Member Since: December 4, 2012

Country: United States

  • Product LCD-00709 | about a year ago

    Everything you need to know to make this work:

    Code:

    #include (LiquidCrystal.h)
    // The line above this needs to have the parenthesis replaced with less-than and greater-than brackets.
    
    LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
    
    void setup() {
      lcd.begin(16, 2);
      lcd.print("hello, world!");
    }
    
    void loop() {
      lcd.setCursor(0, 1);
      lcd.print(millis()/1000);
    }
    

    Wiring diagram:

    wiring diagram

    • pin 1: ground
    • pin 2: 5V
    • pin 3: 3.3kΩ resistor (orange/orange/red) to ground
    • pin 4: digital pin 12
    • pin 5: ground
    • pin 6: digital pin 11
    • pin 7: nothing
    • pin 8: nothing
    • pin 9: nothing
    • pin 10: nothing
    • pin 11: digital pin 5
    • pin 12: digital pin 4
    • pin 13: digital pin 3
    • pin 14: digital pin 2
    • pin 15: 5V
    • pin 16: 47Ω resistor (yellow/purple/black) to 47Ω resistor (yellow/purple/black) to ground

    The 3.3kΩ resistor replaces the potentiometer (at least for me).

    example

    Example code

No public wish lists :(