Module Review #1 - LCD Keypad Shield for Arduino
HTML-код
- Опубликовано: 20 авг 2024
- In this episode I discuss the LCD Keypad Shield for Arduino. It is a fairly basic shield which features an LCD module, 6 buttons, a potentiometer and a power LED. Watch the video to find out more about my opinions on the module.
Keywords & Related Terms:
Arduino LCD
LCD Tutorial
Liquid Crystal Display Tutorial
Keypad LCD Shield
Keypad Tutorial
Arduino Buttons
Your production has been up for awhile, but of many on RUclips that discuss how to use this module, yours finally helped me get the module working. Thank you!
Great video, I have a LCD Keypad Shield, but not using it in any of my project
Thanks for the video. It's really going to help me out with a project I'm working on. If I may offer one piece of constructive criticism: Part way through the video the shield kept moving farther and farther down until it was off screen while you were still pointing out landmarks on the board. Perhaps a monitor or something that enables you to see it from the viewers angle while recording might help? Again, thank you for the video!
is there a way to use this on a breadboard and limit the amount of i/o it uses on the arduino? because im using a servo, lcd, and a buzzer, so i'd like to only plug in things that have to be plugged into the arduino for control
The buttons are on a0 and I want to be able to display if the buttons were pushed, what I'm trying to do is "whenever I press the select button, I want it to generate two separate numbes each going from 1 to 6
Thanks Vlad!!
does anyone know what to do when my potentiometer is stuck at 1023 even when i turn it?
can someone plz post the library that you use for the this shield? thank you
I have one just like your I brought from aliexpress a while back, I would like to see more on programing this key/LCD Shield. The way it is setup as an Analog is not what I had in mind either.
What exactly would you like to see on the LCD tutorial? I've done two of those already.
've tried everything still my LCD shield is not working, it just shows blue screen no boxes or anything, tried adjusting the potentiometer still nothing is displayed on screen
i wonder if you could add 1 more external switch..
Great video!
مشكور على الشرح الجميل
I am sharing your video list on Facebook, Twitter, Blogger I hope this helps
can someone provide me with the LCD keypad shield library that works and can the values of the buttons be different on other DFRobot lcd keypad shield
also can someone go to the video called" LCD dice Arduino" and ask him to provide the code he used to make the dice? the video is ruclips.net/video/3dn-9Rvcr34/видео.html
can you use this on a breadboard?
No
I don’t think you can
i'm trying to run a keypad value test to get the values of my lcd keypad shield, plz help
#include
lcd(8, 9, 4, 5, 6, 7);
int lcd;
int btnStr;
int currx;
int x;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Analog 0: ");
lcd.print(currx);
lcd.setCursor(0,1);
lcd.print(btnStr);
}
void loop() {
x = analogRead(A0); // the buttons are read from the analog0 pin
// Check if x has changed
if ((x != 1023) && (x != currx)){
//update screen and change currx
lcd.setCursor(10,0);
lcd.print(" ");
lcd.setCursor(10,0);
lcd.print(x);
currx = x;
if (currx > 740 && currx < 745){
btnStr="Select";
} else if (currx > 500 && currx < 510){
btnStr="Left";
} else if (currx < 10){
btnStr="Right";
} else if (currx > 140 && currx < 150){
btnStr="Up";
} else if (currx > 320 && currx < 365){
btnStr="Down";
}
//update button pressed
lcd.setCursor(0,1);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(btnStr);
}
delay(10);
}
i keep getting
Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Uno"
keypad_values.ino:2:4: error: expected constructor, destructor, or type conversion before '(' token
lcd(8, 9, 4, 5, 6, 7);
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino: In function 'void setup()':
keypad_values.ino:10:7: error: request for member 'begin' in 'lcd', which is of non-class type 'int'
lcd.begin(16, 2);
^
keypad_values.ino:12:7: error: request for member 'clear' in 'lcd', which is of non-class type 'int'
lcd.clear();
^
keypad_values.ino:13:7: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(0,0);
^
keypad_values.ino:14:7: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print("Analog 0: ");
^
keypad_values.ino:15:7: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(currx);
^
keypad_values.ino:16:7: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(0,1);
^
keypad_values.ino:17:7: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(btnStr);
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino: In function 'void loop()':
keypad_values.ino:28:9: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(10,0);
^
keypad_values.ino:29:9: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(" ");
^
keypad_values.ino:30:9: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(10,0);
^
keypad_values.ino:31:9: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(x);
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:36:14: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
btnStr="Select";
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:40:13: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
btnStr="Left";
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:44:13: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
btnStr="Right";
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:48:13: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
btnStr="Up";
^
C:\Users\taran\Documents\Arduino\libraries\keypad_values\keypad_values.ino\keypad_values.ino.ino:52:13: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
btnStr="Down";
^
keypad_values.ino:57:11: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(0,1);
^
keypad_values.ino:58:11: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(" ");
^
keypad_values.ino:59:11: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(0,1);
^
keypad_values.ino:60:11: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print(btnStr);
^
exit status 1
expected constructor, destructor, or type conversion before '(' token
hi ... the pwer led in the shield is not turn on >> is it burn ( i mean the sheild ????)
can someone help me, the code is
const int buttonPin = A0; // the pin that the pushbutton is attached to
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button
#include
DFR_LCD_Keypad keypad(A0, &lcd);
int lcd;;
int diceOne;
int diceTwo;
#define KEY_SELECT
uint8_t read_key(void);
void backlight_on (void);
void setup() {
// initialize the button pin as a input:
pinMode(buttonPin, INPUT);
lcd.begin(16, 2);
lcd.setCursor(1, 0);
lcd.print("Roll the dice!");
}
void loop() {
if (KEY_SELECT) == HIGH {
// if the current state is HIGH then the button went from off to on:
diceOne = random(1, 7);
diceTwo = random(1, 7);
//read the pushbutton input pin:
buttonState = digitalRead(buttonPin);
// compare the buttonState to its previous state
if (buttonState != lastButtonState) {
// if the state has changed, increment the counter
}
}
}
Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\taran\Documents\Arduino\dice_for_catan\dice_for_catan.ino:9:0: warning: "KEY_SELECT" redefined
#define KEY_SELECT
^
In file included from C:\Users\taran\Documents\Arduino\dice_for_catan\dice_for_catan.ino:4:0:
C:\Users\taran\Documents\Arduino\libraries\DFR_LCD_Keypad/DFR_LCD_Keypad.h:55:0: note: this is the location of the previous definition
#define KEY_SELECT DFR_LCD_KEYPAD_KEY_SELECT
^
dice_for_catan:5:28: error: 'lcd' was not declared in this scope
DFR_LCD_Keypad keypad(A0, &lcd);
^
C:\Users\taran\Documents\Arduino\dice_for_catan\dice_for_catan.ino: In function 'void setup()':
dice_for_catan:19:7: error: request for member 'begin' in 'lcd', which is of non-class type 'int'
lcd.begin(16, 2);
^
dice_for_catan:20:7: error: request for member 'setCursor' in 'lcd', which is of non-class type 'int'
lcd.setCursor(1, 0);
^
dice_for_catan:21:7: error: request for member 'print' in 'lcd', which is of non-class type 'int'
lcd.print("Roll the dice!");
^
C:\Users\taran\Documents\Arduino\dice_for_catan\dice_for_catan.ino: In function 'void loop()':
dice_for_catan:25:17: error: expected primary-expression before ')' token
if (KEY_SELECT) == HIGH {
^
dice_for_catan:25:19: error: expected primary-expression before '==' token
if (KEY_SELECT) == HIGH {
^
exit status 1
'lcd' was not declared in this scope
Has anybody noticed that the (RIGHT) button just below the screen itself is wrongly typed (RIGHT) on this shield? Mine too. Why? Am I (RIGHT)?
Interesting point, I hadn't noticed it myself...
Most of the time the LEFT btn on the Ardnuino LCD shield (DF ROBOT availbale on the marketplace) reads what one types for the DOWN btn, and the SELESCT btn displays what normally stands for the LEFT btn. There is something wrong in the hardware (the LCD shield), this is not an issue of software in the Arduino IDE. Have you ever had gotten this wrong display too?
I've modified the line that displays the time in seconds to the following. This way I was able to put a text label to the displayed time.
= = = = =
lcd.print((millis()/1000)-1); ; lcd.print(" sec gone "); // display seconds elapsed since power-up
// "Time run Maybe obtained in minutes when dividing by 60000 instead of 1000",
// Astonishingly, when I subtracted 1 from the displayed time I obtained a bizarre numerical series "4294967295"
// whose first left-hand side digits are showing the increasing number of seconds or minutes passed since power-up.
// This allowed me to introduce 10 characters of text that including some spaces to cancel any parasite digits
// before and after the "real" text. This allowed labeling the displayed elapsed time in an elegant way even if it is not understood.
= = = = =
Has anybody remarked that the Arduino LCD Shield when run using 9 volt battery keeps the display for about 30 minutes and the display goes fading out to null? Very annoying indeed.
However, you can adjust the brightness of the display of the LCD using a fine screw to turn the screw (that you find above the blue rectangular potentiometer, i.e. to the left-hand side upper corner) clockwise when the display goes really faint.
$7-$30???!!! WTF...I paid $1.99! lol
They went down in price significantly since I made the video. They started off around 30$ and went down to 2$ in 3 years.
OH...ok...thought you just got happily bent over and pounded on that purchase...my bad lol
hahaha
if the buttons are strange to u
STOP MAKING ARDUINO VIDEO'S
+D Boer but people like my arduino videos :(
if he is strange to you. MOVE ON WITH LIFE AND IGNORE HIM. DON'T COMMENT ON HIS VID INSTEAD