Ks0137 keyestudio EASY plug 1602 I2C Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
==Introduction==
==Introduction==
This is a basic 16 character by 2 line LCD display with white text on blue background. On the back comes with a potentiometer to adjust the screen contrast. You can use only one line for simple connection.<br>
This is a basic 16 character by 2 line LCD display with white text on blue background. On the back comes with a potentiometer to adjust the screen contrast. You can use only one line for simple connection.<br>
This module should be used together with EASY plug control board.
<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>
<br>
<br>


Line 29: Line 34:
<br>
<br>
==Upload the Code==
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0397 14.1.png|500px|frameless|thumb]]<br>
//Compatible with the Arduino IDE 1.0
 
//Library version:1.1
<br>
#include<Wire.h>   // Place file “Wire.h” under the directory “library” of Arduino
==What You Should See==
#include<LiquidCrystal_I2C.h> // Place “LiquidCrystal_I2C.h” under the directory “library” of Arduino
<br>[[File:ks0397 14-1.png|500px|frameless|thumb]]<br>
LiquidCrystal_I2C lcd(0x27,16,2);// set the LCD address to 0x27 for a 16 chars and 2 line display
<br>
void setup()
Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.<br>
{
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.<br>
lcd.init();// initialize the LCD
<br>[[File:ks0397 14-7.png|500px|frameless|thumb]]<br>
lcd.init();// Print a message to the LCD.
<br>
lcd.backlight();
<br>
lcd.setCursor(2,0);
<span style="color: red"><big>'''Little Knowledge:'''</big></span> <br>
lcd.print("Hello, world!");
* If you want to change the characters showed on the LCD screen, you can modify it in the code shown below.  
lcd.setCursor(2,1);
<br>[[File:ks0397 14-5.png|500px|frameless|thumb]]<br>
lcd.print("keyestudio!");
<br>
}
* Remember you can adjust the contrast by rotating a blue potentiometer  on the LCD back if you can’t make out the words clearly.
void loop()
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
{
}
</pre>


<br>
==Extension Experiment==
<br>
<span style=color:brown><big>'''Tilt Controlled Counting'''</big> </span><br>


<span style="color: red">'''Code to Note: ''' </span><br>
Next, let’s get started with a little bit more complicated experiment. <br>
Before compile the code, do remember to put the libraries needed inside the libraries folder of Arduino IDE directory.<br>
For instance, use a tilt sensor to control the 1602 LCD show the counting. Let’s get started right now!
Download all the libraries:<br>
<br>
https://drive.google.com/open?id=105RNjo0aDBthorceoKgqaJ251D3tbWlc


'''Hookup Guide'''<br>
Connect the EASY Plug LCD module, two LED modules and a tilt sensor to control board using RJ11 cables.
<br>[[File:倾斜灯LCD.jpg|500px|frameless|thumb]]<br>
<br>
<br>
==What You Should See==
 
Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.
'''Test Code'''<br>
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<br>[[File:ks0137 Result.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0397 14.2.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
Done uploading the code, if tilt the sensor, the red LED is turned on, and you should see the number showed on the first line of 1602 LCD will plus 1 per second, and '''++''' is displayed on the second line.<br>
<br>[[File:ks0397 14-2.png|500px|frameless|thumb]]<br>
<br>
If tilt the sensor to another side, the white LED is turned on, and you should see the number showed on the first line of 1602 LCD will subtract 1, and -- is displayed on the second line.<br>
<br>[[File:ks0397 14-3.png|500px|frameless|thumb]]<br>
 
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.<br>
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
<br>
* But if you want to show other characters, you can also change it in the code shown below.
<br>[[File:ks0397 14-4.png|500px|frameless|thumb]]<br>
 


<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF:'''<br>
 
https://drive.google.com/open?id=1JS4n3MTCjJXYyMunvqFNCQRlUKGfA2ib
https://fs.keyestudio.com/KS0137
<br>
'''Download the libraries:'''<br>
https://drive.google.com/open?id=105RNjo0aDBthorceoKgqaJ251D3tbWlc


<br>
<br>


==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0137.html
*[https://www.keyestudio.com/newkeyestudio-easy-plug-iic-i2c-1602-lcd-display-module-for-arduino-steam-p0100-p0100.html '''Official Website''' ]


*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-IIC-I2C-1602-LCD-Module-for-Arduino/1452162_32645935653.html?spm=2114.12010612.8148356.16.627466e6AdFkCx  Shop on aliexpress ]
*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-IIC-I2C-1602-LCD-Module-for-Arduino/1452162_32645935653.html?spm=2114.12010612.8148356.16.627466e6AdFkCx  Shop on aliexpress ]


[[category:EASY Plug]]
[[category:EASY Plug]]

Latest revision as of 17:04, 7 January 2021

Keyestudio EASY plug 1602 LCD Module


Introduction

This is a basic 16 character by 2 line LCD display with white text on blue background. On the back comes with a potentiometer to adjust the screen contrast. You can use only one line for simple connection.
This module should be used together with EASY plug control board.

Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Specification

  • Connector: Easy plug
  • Compatible with Arduino LiquidCrystal Library
  • White text on blue background
  • 16 characters wide, 2 rows
  • I2C Address: 0x27
  • Back Light: Blue
  • Text Color: White
  • Supply Voltage: 5V
  • Adjusting contrast by a potentiometer


Technical Details

  • Dimensions: 99mm*37mm*21mm
  • Weight: 37.4g


Connect It Up

Connect the EASY Plug 1602 LCD to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See


thumb

Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.

thumb


Little Knowledge:

  • If you want to change the characters showed on the LCD screen, you can modify it in the code shown below.


thumb

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Extension Experiment


Tilt Controlled Counting

Next, let’s get started with a little bit more complicated experiment.
For instance, use a tilt sensor to control the 1602 LCD show the counting. Let’s get started right now!

Hookup Guide
Connect the EASY Plug LCD module, two LED modules and a tilt sensor to control board using RJ11 cables.
thumb

Test Code
Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See
Done uploading the code, if tilt the sensor, the red LED is turned on, and you should see the number showed on the first line of 1602 LCD will plus 1 per second, and ++ is displayed on the second line.

thumb

If tilt the sensor to another side, the white LED is turned on, and you should see the number showed on the first line of 1602 LCD will subtract 1, and -- is displayed on the second line.

thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb

  • But if you want to show other characters, you can also change it in the code shown below.


thumb



Resources

https://fs.keyestudio.com/KS0137


Buy from