Monday, January 19, 2015

Liquid Crystal Display

I took a day off yesterday and a bit of a detour today as I wanted to hammer down the Liquid Crystal Display (LCD). I haven't really thought of a practical use for it, but when I found the display in my kit we joked that we would make it say "hello, human!". Our first attempts failed because we didn't know how to use a bread board or a potentiometer. Also, somewhere along the way I had unkowingly burnt out the 5th digital pin on my Arduino. As I write this, I am realizing I have learned quite a bit this month. Pretty cool.

Hello, Human!

Bonus points if you recognize the background (un?)related audio.

Here is the link with all of the info on LCD and Arduino.

And here is the code I used. (I swapped the digital 5 pin for the 7 pin to make mine work.)


#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 7, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, human!");
}

void loop() {

  lcd.setCursor(0, 1);
  lcd.print(millis()/1000);
}

No comments:

Post a Comment