Ks0256 keyestudio LCD1602 Expansion Shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:


[[image:256 (1).jpg|thumb|800px|right|keyestudio LCD1602 Expansion Shield ]]
[[image:Ks0256-.png|thumb|700px|right|keyestudio LCD1602 Expansion Shield ]]


<br>
<br>
==Introduction==
==Introduction==
The keyestudio LCD shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It is very simple and convenient for you to stack it onto [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD  UNO board ]. <br>
The keyestudio LCD shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It is very simple and convenient for you to stack it onto [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD  UNO board ]. <br>
There are two communication methods for 1602 LCD display and UNO R3 board, separately the 8-Bit connection and 4-Bit connection. The LCD shield is default the 4-Bit connection. <br>
There are two communication methods for 1602 LCD display and UNO R3 board, separately the 8-Bit connection and 4-Bit connection. <br>
Under LCD there are 5 control buttons (Select, Up, Down, Left, Right) and a reset button. The 5 buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input. Pay attention: status monitoring is unavailable when several buttons are pressed.
The LCD shield is default the 4-Bit connection. <br>
Under LCD there are 5 control buttons (Select, Up, Down, Left, Right) and a reset button. The 5 buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input. <br>
Pay attention that the status monitoring is unavailable when several buttons are pressed.<br>
The shield also comes with a potentiometer to adjust the LCD backlight.
The shield also comes with a potentiometer to adjust the LCD backlight.


<br>
<br>
==Technical Details==
==Technical Details==
* 1.LCD size: 20.5mm * 41mm
* 1.LCD size: 20.5mm * 41mm
Line 21: Line 24:
* 9.Dimensions: 80mm *58mm*22mm
* 9.Dimensions: 80mm *58mm*22mm
* 10.Weight: 51.5g
* 10.Weight: 51.5g
<br>[[File:Ks0256 size.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0256 size.png|700px|frameless|thumb]]<br>


<br>
<br>
== Pinout Guide ==
== Pinout Guide ==
<br>[[File:Ks0256 pinout.jpg|500px|frameless|thumb]]<br>
<br>[[File:Ks0256 pinout.jpg|800px|frameless|thumb]]<br>


<br>
<br>
Line 32: Line 35:
=== Connect it Up ===
=== Connect it Up ===
Simply stack the LCD shield onto UNO board, then connect the board to your computer with a USB cable.
Simply stack the LCD shield onto UNO board, then connect the board to your computer with a USB cable.
<br>[[File:Ks0256 pinout.jpg|500px|frameless|thumb]]<br>
<br>[[File:图片1- ks0256.png|700px|frameless|thumb]]<br>


<br>
<br>
===Upload the Code ===
===Upload the Code ===
*Copy and paste the code below to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE  Arduino IDE ] <br>
*Copy and paste the code below to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE  Arduino IDE ] <br>
Line 40: Line 44:
*[https://drive.google.com/open?id=1I-VnwhX1IEcYjQvMFjI0TJSc5yfdX9AH  Click here ]to download the libraries ''LiquidCrystal.h''  <br>
*[https://drive.google.com/open?id=1I-VnwhX1IEcYjQvMFjI0TJSc5yfdX9AH  Click here ]to download the libraries ''LiquidCrystal.h''  <br>


'''Note:''' Before compile the code, do remember to add the necessary libraries inside the libraries folder of Arduino IDE.
<span style=color:red>'''Note:''' Before compile the code, do remember to add the necessary libraries inside the libraries folder of Arduino IDE.<br>


<pre>
<pre>
Line 133: Line 137:
<br>[[File:Ks0256 upload.png|600px|frameless|thumb]]<br>
<br>[[File:Ks0256 upload.png|600px|frameless|thumb]]<br>
<br>
<br>
===What you should see?===
===What you should see?===
Done uploading the code to the board, you should see the LCD screen show “Hello keyestudio” on the first line, and the second line shows the increasing number. If cannot see the text clearly, rotate the potentiometer on the shield to adjust the screen backlight. You could press the five buttons to separately get the letter S U D L R, and press the Reset button to restart it again. <br>
Done uploading the code to the board, you should see the LCD screen show “Hello keyestudio” on the first line, and the second line shows the increasing number. <br>
<br>[[File:256 (7).jpg|600px|frameless|thumb]]<br>
If cannot see the text clearly, rotate the potentiometer on the shield to adjust the screen backlight. <br>
You could press the five buttons to separately get the letter S U D L R, and press the Reset button to restart it again. <br>
<br>[[File:256 (7).jpg|500px|frameless|thumb]]<br>


<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF file here:'''  <br>
https://drive.google.com/open?id=1Xx38hJ_G7iik-hXsxS8IfM1z1ugrQwix


'''Download the code:''' <br>  
'''Download code and libraries:''' <br>  
https://drive.google.com/open?id=1KavI1PvtaQY8eSkcowr0Mruq3d9sW66L


'''Download all the libraries:''' <br>
https://fs.keyestudio.com/KS0256
https://drive.google.com/open?id=1I-VnwhX1IEcYjQvMFjI0TJSc5yfdX9AH


'''VIDEO:'''<br>
'''VIDEO:'''<br>
http://www.keyestudio.com/wp/ks0256/
http://video.keyestudio.com/KS0256/


<br>
<br>
==Get One Now ==
==Get One Now ==
* '''Official Website:''' http://www.keyestudio.com/ks0256.html
*[https://www.keyestudio.com/keyestudio-1602lcd-keypad-shield-for-arduino-lcd-display-atmega2560-for-raspberry-pi-uno-blue-screen-blacklight-module-p0303.html     '''Official Website''' ]


* [ '''Shop on Amazon''']
* [https://www.amazon.com/dp/B07B1W7BKT '''Shop on Amazon''']


* [ '''Shop on eBay''']
* [https://www.ebay.co.uk/itm/163166605725 '''Shop on eBay''']


* [  '''Shop on Aliexpress''']
* [https://www.aliexpress.com/store/product/1602LCD-Keypad-Shield-For-Arduino-LCD-Display-ATMEGA328-ATMEGA2560-For-Raspberry-Pi-UNO-Blue-Screen-Blacklight/1452162_32812961850.html?spm=2114.12010612.8148356.22.4fbf276fo20GxY   '''Shop on Aliexpress''']






  [[Category: Shield]]
  [[Category: Shield]]

Latest revision as of 14:19, 6 January 2021

keyestudio LCD1602 Expansion Shield


Introduction

The keyestudio LCD shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It is very simple and convenient for you to stack it onto UNO board .
There are two communication methods for 1602 LCD display and UNO R3 board, separately the 8-Bit connection and 4-Bit connection.
The LCD shield is default the 4-Bit connection.
Under LCD there are 5 control buttons (Select, Up, Down, Left, Right) and a reset button. The 5 buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input.
Pay attention that the status monitoring is unavailable when several buttons are pressed.
The shield also comes with a potentiometer to adjust the LCD backlight.


Technical Details

  • 1.LCD size: 20.5mm * 41mm
  • 2.Display capacity: 16*2 character
  • 3.White texts on blue background
  • 4.Comes with a potentiometer to adjust the backlight
  • 5.Chip working voltage: 4.5-5.5V
  • 6.Working current: 2.0 mA (5.0V)
  • 7.Optimum working voltage: 5.0V
  • 8.Character size: 2.95*4.35 (W*H) mm
  • 9.Dimensions: 80mm *58mm*22mm
  • 10.Weight: 51.5g


thumb


Pinout Guide


thumb


How to test it?

Connect it Up

Simply stack the LCD shield onto UNO board, then connect the board to your computer with a USB cable.
thumb


Upload the Code

Note: Before compile the code, do remember to add the necessary libraries inside the libraries folder of Arduino IDE.

/*
  Liquid Crystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The Liquid Crystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 8
 * LCD Enable pin to digital pin 9
 * LCD D4 pin to digital pin 4
 * LCD D5 pin to digital pin 5
 * LCD D6 pin to digital pin 6
 * LCD D7 pin to digital pin 7
 * Button pin to analog pin A0
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

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

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);
  int val=analogRead(A0);
  Serial.println(val);
  if(val>=0&&val<=50)
  {
    lcd.setCursor(5,1);
    lcd.print("R");
  }
  else if(val>=50&&val<=150)
  {
    lcd.setCursor(5,1);
    lcd.print("U");
  }
  else if(val>=150&&val<=300)
  {
    lcd.setCursor(5,1);
    lcd.print("D");
  }
  else if(val>=300&&val<=500)
  {
    lcd.setCursor(5,1);
    lcd.print("L");
  }
  else if(val>=500&&val<=750)
  {
    lcd.setCursor(5,1);
    lcd.print("S");
  }
}


thumb

What you should see?

Done uploading the code to the board, you should see the LCD screen show “Hello keyestudio” on the first line, and the second line shows the increasing number.
If cannot see the text clearly, rotate the potentiometer on the shield to adjust the screen backlight.
You could press the five buttons to separately get the letter S U D L R, and press the Reset button to restart it again.

thumb


Resources

Download code and libraries:

https://fs.keyestudio.com/KS0256

VIDEO:
http://video.keyestudio.com/KS0256/


Get One Now