This project shows you how to control a Sparkfun 16x2 Character display using Arduino.
Let's start making:
Connect the jumper wires, Arduino and Sparkfun display to breadboard.
- LCD V55 pin to Arduino GND
- LCD VDD pin to Arduino 5V
- LCD VO (pin3) to potentionmeter middle pin
- LCD RS pin to digital pin 12
- LCD RW pin to Arduino GND
- LCD Enable pin to digital pin 11
- LCD D4 pin to digital pin 5
- LCD D5 pin to digital pin 4
- LCD D6 pin to digital pin 3
- LCD D7 pin to digital pin 2
- LCD A+ pin to Arduino 5V
- LCD k- pin to Arduino GND
Connect your Arduino to the computer and CODE:
// include the library code: 
#include <LiquidCrystal.h> 
// initialize the library with the numbers of the interface pins 
LiquidCrystal lcd(12, 11, 5, 4, 3, 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("Hello, Hackster!"); 
} 
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(millis() / 1000); 
} 
Or open Arduino IDE and go to file/example/liquid crystal/Hello world. Set contrast in potentionmeter. Enjoy.


_CD6JakLT6S.jpg?auto=compress%2Cformat&w=900&h=675&fit=min)

_ztBMuBhMHo.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)











_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments