Using LCD Displays with Arduino

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today in the workshop will be working with liquid crystal displays we'll learn two different methods of connecting these displays to our Arduino including using the i2c bus we'll build a digital temperature and humidity gauge and we'll learn how to use an LCD keypad filled with some very unusual push buttons there's a lot on display today so welcome to the workshop [Music] hello and welcome to the workshop today we're going to be working with liquid crystal displays or LCDs now I know you've seen LCDs and all sorts of different appliances and equipment we first started to see them used in calculators and digital watches in the late 1970s and now they've progressed into all sorts of displays including video displays in fact I'm willing to bet that the video display you're watching this video on right now makes use of LCDs most televisions these days including so-called LED televisions are actually LCDs LCDs have an advantage in that they're very easy to manufacture and mass-produce so they can be made quite inexpensively and they are very versatile devices now LCDs work in a principle of a liquid crystal which can align itself between two different polarized filters and then either let light pass or it can block light and because it doesn't emit light itself an LCD requires a backlight now this backlight can be manufactured in a number of different ways they've used electric luminescent panels for them fluorescent tubes have been used but by far the most common method these days is to use an LED backlight now the LCDs were going to be working with today are very simple monochrome LCDs they're either two or four line displays and you can purchase these they're quite inexpensive and they can be used in your Arduino or Raspberry Pi projects we're going to be focusing on the Arduino today now LCD displays have a lot of advantages and that they are outside from being low cost they are also very low current so they won't take a lot of power so they're ideal for battery devices and they're certainly nicer than using a serial monitor in your project so let's take a look at the LCD displays we're going to be using and also at a very interesting little shield that I'm also going to show you how to use with the Arduino now the display we're going to be working with today is called a 1602 display and it's called that for a reason it's got 16 characters across on the row that's where the 16 from and it has two rows now you can also get a 1604 display which would have 16 characters and 4 rows now this little device over here is an i2c adapter I squared C adapter it allows you to use the i2c bus to communicate with the display and as you're going to see that will really cut down on the number of wires you need to connect to the display so these are quite handy devices to have now this is a shield for the Arduino and it's an interesting shield it has a 1602 display on it it also has a series of push buttons on it and these six buttons can be used in your project now what's interesting about this display to me is actually the way the buttons are connected and I'll show you that in a minute they aren't what you might expect now this is my little experimenters platform and I just wanted to show that to you I've built that just so we can do our test today what I did is I took a 16-2 o2 display and I soldered a female header strip on the top now this is not the normal way you'd do things normally you would solder a header strip on to the bottom of the display and you'd probably solder a male one on to it or you would connect one of these I 2c adapters directly on to the pins of the display but I chose to do this for a reason although it's not a practical reason because you could never use this display in a project with this connector sticking up it allows me to connect the wires from the Arduino to the display quite easily so I've just done this or prototyping purposes so now that you've seen the display let's take a look at the pin outs on the display now here are the pin outs for the LCD 1602 display pin 1 which is often labeled VSS is the ground pin for the display pin 2 which can be labeled VDD is the 5 volt power supply for the display pin 3 which is labeled vo is the input pin for the brightness control for the display pin 4 which can be labeled rs is the register select pin pin 5 which can be labeled RW is the read/write pin pin 6 labelled e n is the enable pin pin 7 through 14 are the parallel data input pins pin 7 is data 0 pin 8 is data 1 10 9 is data to pin 10 is data 3 pin 11 is data 4 and 12 is data 5 pin 13 is data 6 and pin 14 is data 7 pin 15 which is sometimes labeled with an A is the anode of the backlight LED and pin 16 which is often labeled with a k is the cathode of the backlight LED now the display works on parallel data and takes in one bite at a time this requires 8 connections which is a lot of connections to make to a microcontroller you can also run the display in a half byte mode and in this case data pins d4 through d7 are used to transmit one half of the byte at a time this cuts down on the number of wires you'll need to run to your interface so now that we've seen the pin outs of the LCD 1602 it's time to get experimenting with one we're going to hook one up to an Arduino and run a number of experiments now the Arduino IDE comes with a library called liquid crystal and we'll be using that library and some of the example sketches that come with that library so for our first few experiments you won't even need to write any code after that we're going to modify a couple of those sketches in order to create our own sketch can add a few more components to build an interesting project with our LCD display so let's get going and see how we hook our Arduino up to the LCD display now here's how we'll be hooking up our experiments we will need an Arduino Uno an LCD 1602 display module a 10k trim pot or variable resistor and a 220 ohm resistor we'll start by connecting the arduino 5 volt out to the displays 5 volt in that's pin 2 on the display labeled VDD next we'll take the Arduino ground and connect it to the display ground which is pin 1 on the display labeled VSS we'll take both ends of our trim pot and tie them across to 5 volt and ground lines from the Arduino we'll then take the wiper from the trim pot and connect it to the display brightness control that's pin 3 labeled vo Arduino digital pin 12 will connect to the display register select pin that's pin 4 on the display labeled RS we will ground the displays readwrite line that's pin 5 on the display labeled u RW our dueño digital pin 8 will be connected to the display and able line that's pin 6 on the display labeled en Arduino pin 5 will be connected to displays data pin 4 that's pin 11 labeled D for our dueño digital pin 4 will be connected to display data line 5 that's pin 12 label d 5 Arduino pin 3 will be connected to display data line 6 that's pin 13 label D 6 on the display our dwee no data pin 2 will be connected to display pin data 7 that's pin 14 labeled d7 we'll tie one end of the 220 ohm resistor to 5 volts the other end of the resistor will be connected to the display backlight anode connection that's pin 15 labeled a on the display and finally the ground from the Arduino will be connected to the display backlight cathode that's pin 16 labeled K on the display now the sketches were going to be looking at or included as example sketches in your Arduino IDE so the way you access them is to go into file and then go to examples and go down to examples for any board and you'll find liquid crystal and you'll see a number of sketches that you can try with your liquid crystal display now these sketches are set up to have the display wired as I showed you in the wiring diagram so the first one we're going to try is HelloWorld now after some credits as to who wrote the sketch and description as to how to connect the LCD we get into the actual sketch itself now first of all like all of these sketches we include the liquid crystal library we then initialize the library first of all we define a number of integers and these integers represent the pins we've connected the LCD display to then we create an object called LCD and define it with those pin numbers now if you wanted to change the way you've got it wired you would just change these pins accordingly in the setup we set up the LCD for the number of columns and rows so we're using 16 columns and two rows so we use LCD begin 16 2 and then we print the message for the LCD and it's just as simple as doing an LCD print and the message you're printing is hello world you can experiment of course by changing that message as long as it's 16 characters or less it'll fit on your display now in the loop we're going to set the cursor to the next column so we do a set cursor command and we're going to set it to position 0 and column number 1 now keep in mind the top column is column number 0 so the second column is number 1 after this we're going to print the number of seconds since the reset so we'll take the millisecond command and we'll divide it by 1000 and we'll print that so milliseconds divided by a thousand will give you a second so every time a second occurs we print the number and then we go through the loop and do it over and over again and it's as simple as that so let's take a quick look at how that looks once it's running so here's the hello world sketch and as you can see it is printing hello world on the first line and on the second line in the first position we're counting the number of seconds since the Arduino was last reset now I'm going to adjust the trim pot that controls the brightness and as you can see at one extreme you can't see the display at all then you start to see it it gets brighter and then you start seeing the actual character outlines at the back if you bring it too far up so you need to come to a sort of happy medium between the two something like this so now let's go and take a look at another example sketch the next example we're going to look at is the scroll sketch now this again is found in the example section for the liquid crystal and this as the name would imply shows you how you can scroll text scrolling is a convenient thing to be able to do it's a way of overcoming the limit of only having sixteen characters in a row on the display and it's also a way to draw attention to the text so the sketch starts off identically to the last one we include the liquid crystal library we define the pins were using and set up an LCD object with those pins defined the setup is very similar as well we define the number of columns and rows with an LCD begin and we print a message to the LCD so again we're going to print hello world and we'll delay things for a second now we move into the loop and this is where we do the scrolling and we'll juice three Scrolls in the loop the first one is to scroll 13 positions to the left so we set up a four next counter so we'll do a four int going from 0 to 13 we'll advance the variable called position counter every time by 1 and then we will do an LCD scroll display left we'll wait a bit we'll delay and then we'll go and do it again so every time we this we're going to scroll one position left and we're going to do this 13 times then we're going to scroll 29 positions to their right so basically we are going to do the same thing we'll set up a counter except we're going to go from 0 to 29 this time and we're going to do a scroll display right to command wait a bit and do the whole thing again and then once again we're going to scroll back to the center which means you're going to scroll the display left again we'll set up the counter from 0 to 16 do an LCD scroll display left wait a bit and do it again finally at the end of the loop we'll wait for a second and then we'll start the whole loop all over again so let's take a quick look to see what that looks like once we load it up to the arduino and here's the scroll sketch in action and it does pretty well what you'd expect it to do it's scrolling the hello world back and forth on the display and then pausing for a second after a complete iteration of the loop so now let's move on to one more example sketch the final demonstration we'll be looking at is the custom character demonstration now custom characters can be useful when you want to display a character on the LCD display that's not part of the standard ASCII character set you can define your own custom characters but keep in mind that a character on the LCD display is done in a five by seven matrix so your character needs to be done within the confines of that matrix before we run this sketch we need to add one additional component to our circuit a potentiometer which we will connect as follows we'll connect five volts in the Arduino to one side of the pot will connect the opposite side to the ground on the Arduino and we'll connect the wiper to the analog 0 input on the Arduino now let's take a look at the custom character sketch the sketch starts just as our previous sketches have we've included the liquid crystal library and we've defined the connections to our LCD display then we create an LCD object using those connections now we need to mix and characters each one of our characters is defined as an array of bytes the arrays have eight elements to them the first one we're going to call heart now each of these entries in the array determine which elements are turned on and turned off within the character display on the LCD our next one is called smiley and frowny and we have one called arms down and arms up these are a little stick man with his arms facing down and his arms facing up now in the setup we initialize the LCD as we did previously through the size of our display which in our case is 16 by 2 and now we need to actually create the characters so we used to create car function now each character's defined with a number so the heart we defined earlier is number 0 the smiley is number one the frowny array is number two etc etc then we'll set our cursor to the top left corner and we'll print something on the first line we'll print I space and then we were right character number zero which is the heart then we'll write Arduino then we'll write character number one which is the smiley so the line should read I heart Arduino with a smiley at the end of it now let's go into the loop now we'll read the potentiometer using the analog read command and define that as sensor reading next we're going to map that result to a range of 200 to 1000 so sensory reading can be anything from 0 to 1023 and we'll use the map command to map that 200 to 1000 and assign that to the variable delay time now we're going to set our cursor to the bottom row in the fifth position and we'll draw a little man with the arms down so that's element number 3 the arms down then we'll delay by the delay time that we've determined by the position of the control and we'll draw the little man with the arms up and we'll delay him again by the same delay and we'll repeat over and over again the effect of this is as we turn the control the little man will wave his arms up and down at a different speed so now that you've seen the sketch let's take a look at it and so here's our custom character sketch you can see it says I heart Arduino with little smiley and you can see her a little stickman down here and he's waving his arms up and down he's doing an alteration between the arm up and arm down and so if I turn the control all the way to one extreme his arms move very slowly I'm assuming it's a heat and if I go to the other extreme he's much more excited he's waving his arms up and down a lot quicker I hope you can see that and so that's the custom character sketch now as we've seen from the previous demos using the LCD display with the liquid crystal library is quite simple and we can build a number of projects just using that library and an Arduino and adding sensors and switches etc to our circuit to to make a complete project however one thing you may have noticed is that we're using a lot of the isle lines on the arduino even though we're only using four data connections instead of eight we still have control connections that also go to the display and as a result on the arduino uno we've used half of the digital i/o connections now you can use little tricks like using the analog inputs as additional digital i/o lines if you wish but there's another method of cutting down the number of connections that the LCD display and thus freeing up the rest of the i/o ports for other things and that method is i2 c or i IC inter integrated circuit communications now this is a very important Arduino concept and it certainly goes far beyond just using LCD displays you can connect all sorts of devices using i2c you can even connect to our dwee nose together or an Arduino and Raspberry Pi or several Arduino and a Raspberry Pi and communicate through i2c it's a fascinating subject that I intend to do an entire video about one day but for today we are going to simply look at using i2c to drive our display using that little adapter that I showed you at the beginning of the video so let's take a quick look at how I to see works and then we'll look at the adapter that we're going to use in order to use i2c with our liquid crystal display the i2c or inter integrated circuit bus can also be referred to as the I squared C or III C bus it was developed by Philips semiconductor in 1982 for communications between integrated circuits and televisions the bus is used to connect multiple devices to one micro controller or to connect multiple microcontrollers and micro computers to each other the i2c bus is generally used over short distances usually a metre or less the i2c bus consists of four pins VCC which can be 3.3 or 5 volts a ground pin the SDA pin which contains the data on the bus and the SCL pin for the clock signal originally the i2c bus was available in two speeds 100 kilohertz or 400 kilohertz additional speeds have been added fast mode Plus which is 1 megahertz high-speed mode which is 3.4 megahertz and ultra fast mode which is 5 megahertz the data and clock lines on the bus use pull-up resistors to bring the signals high when they are unused the i2c bus uses a concept of masters and slaves generally we have one master and multiple slaves every device on the bus has a unique address in operation the master calls the slave address to address the slave and retrieve data or descendant data so here's a little adapter we're going to be using to convert our LCD displays to use the i2c bus these are very inexpensive and they're quite simple to use they've got a 4 pin connector on them and this is where you connect the i2c bus connections they've got a little control on them and that's how you control the brightness of the LCD there's a jumper here so you can turn on and off their internal power LED and they've also got three little jumper points over here that you can solder over now what those three jumper points are for are to change the i2c address of the device now since we're only using one eye to see device in our experiments we won't need to worry about this but if you're using multiple eye to see devices you can't have two devices with the same address so this will allow you to resolve any conflicts that you might have with the i2c address now a normal operation what you would do is you would take one of these mount it on the back of your LCD display and just solder it on over here and then you end up with a little backpack device which is quite convenient and very easy to mount now of course I'm using my experimenters platform so I'm just going to plug mine on platform like that and it fits on there very nicely and I can just add my i2c connections up here and experiment with it obviously this isn't very practical because it sticks up beyond the front of the LCD display but again this is just for experimenting and prototyping so now that you've seen the device let's take a look at how we hook it up the hook up for our eye to see experiment is quite simple you will need an Arduino Uno and an LCD display with the i2c adapter connected to it the VCC from the i2c adapter will be connected to the 5 volt output on the Arduino the ground from the adapter will be connected to the arduino z' ground the SDA connection on the adapter will be connected to the SDA connection on the arduino uno if your arduino does not have an SD a connection connected to analog pin a for the SCL connect pin will be connected to the SCL connection on the arduino if you do not have an SC L connection use pin a 5 now before we start RI 2 C experiments will need to determine what the addresses of the adapter that we're using now you may already know this address but if you don't this is an easy way to find out this is a scanner that was written by Nick gammon and I've got the code for this up in the article that's associated with this video load this up to your Arduino and then go into your serial monitor and this will display the address of all the i2c connections available to the Arduino right now there's only one which is of course our LCD adapter so it's this number here we're looking for the 3f hexadecimal number is the address of my adapter and I'm going to be using that in my sketches so let's take a look at the first sketch we'll be using with our LCD display connected with the i2c adapter now in order to use this demo and the subsequent demos you're going to need to install a new library and you're going to need to grab the library from the link that I provided in the article associated with this video you'll get the latest version of the library which is called new liquid-crystal and you'll download a zip file to a location on your hard drive that you're familiar with after that in order to install it you'll go into sketch include library add zip library and navigate to the place where you downloaded it then you'll select the library and click OK to install it I've already installed it so I won't go through the whole process right now once it's installed we can begin to look at this sketch now the first library we include is the wire library the wire library is an art library that's built into your arduino ide and is for using the i2c bus then it will include the new library we install the new liquid crystal library after this we're going to define some LCD pin outs now this is the LCD pin out pattern for the i2c adapter you are using it's not the pin out pattern for the Arduino because the Arduino is connecting through i2c now this is the pattern for the adapter I'm using there are a couple of different ones and in the article associated with this video have listed some other combinations in case yours doesn't match the next thing we do is we define the address for our eye to see adapter now you'll recall from the last sketch that I determined that my adapter was at hexadecimal 3f if yours is different and many of them are at to 7 you need to change this line to match where your adapter is then we create an LCD object using the information that we just provided above now the new liquid-crystal library actually is compatible with the original liquid-crystal library and all of the same commands will work so these will look very familiar we do an LCD begin to set up for display as 16 by 2 then we're going to print on the first row we'll set the cursor to position 0 0 and we'll print hello world the NAFTA bet will delay a second and on the second row we'll print how are you will 8 wait 8 seconds and then we'll clear the display now we'll go into the loop and we're just going to demo a few of the features of the display in the i2c interface in our loop the first demo is to flash the backlight so we'll set our cursor at position 0 0 and we'll print backlight demo to the display then we'll set the cursor to the row below and we'll print flash 4 times will delay for 3 seconds and then clear the display then we'll flash our backlight 4 times we're going to go through a loop so we set up an integer called eye and we'll go through the value of 0 to 4 we'll increment by 1 and during each increment we'll do an LCD backlight which turns the backlight on will delay for a quarter of a second then we'll do an LCD no backlight which will turn your backlight off and will delay for another quarter second it will repeat this four times to flash the backlight four times when we're done we'll turn the LCD backlight back on now for demo 2 we're going to do a scroll so once again we'll set the cursor to position 0 0 will print scroll demo will delay for one-and-a-half seconds and then we're going to use the auto scroll command and we're going to start printing the number 0 to 9 after the word scroll demo so again we'll use a for loop we'll call our variable this car and we'll have a go from a value 0 to nine because we're looking for something that's less than ten and we'll increment by one every time and on every intrument we'll print this car and then we'll delay for half a second and we'll continue to do this so the number zero to nine should start printing and the display should start scrolling then we'll turn off the scrolling will clear the screen delay for a second and go back up and repeat the loop over again so now that you've seen our demo sketch let's take a quick look at it in action so here's our demonstration starts off with the hello world how are you and it moves into the loop the first thing is the backlight demo so it flashes it four times and then the scroll demo and it repeats the backlight demo and the scroll demo and it will continue to do this infinitely so now let's build something more practical with our LCD display so we've seen how we can connect our LCD display up to our Arduino in two different fashions both directly and using i2c and we've run some demo sketches to illustrate how everything works but I think now it's time to build something practical so for our next demonstration I'm going to build a temperature and humidity gauge using an LCD along with a dht22 temperature sensor so let's take a look at how that's going to work in order to build our temperature and humidity sensor we'll need to add a dht22 temperature and humidity sensor device to our circuit we hook pin one of the dht22 to the 5 volts on the Arduino pin 2 of the dht22 is its output and that goes to digital pin 7 on the Arduino pin 4 of the dht22 is the ground connection and this goes to the Arduinos ground pin 3 remains on enacted now that we've hooked it up let's take a look at the sketch we'll need to make it work our temperature and humidity sketch is going to make use of some libraries from Adafruit as well as the libraries we've already installed I've talked about these libraries in an earlier video specifically the one in using the 8c SR 0 for ultrasonic sensor and I went into detail on how to install it essentially these can be installed from your library manager you'll need both the unified sensor library and the DHT libraries from Adafruit I also have details on the article associated with this video on the website in case you need further details on installing those libraries once you've installed the libraries you can begin to sketch we start as we did with the last sketch by including the wire library for i2c and including our liquid crystal library the new liquid crystal library then we'll include the DHT library from Adafruit once again we define the LCD pin out that our adapter uses and we'll set up the adapter address again you may need to change these two lines depending upon your adapter now we'll define a couple of pins through the dht22 will define pin 7 as the output connection and we'll define the type of sensor as a DHT 22 as a DHT library can handle a number of different sensors a game will set up the connections to the LCD and create an object called LCD and define a couple of variables one which defines our humidity and one which will hold our temperature value after that we'll set up the DHT sensor for normal operation we then go into our setup in the setup once again we set up our display type as a sixteen by two and we initialize the dht22 and now into the loop our loop starts with a two second delay this is required so the dht22 sensor can stabilize then we'll get the humidity and temperature values from the dht22 and we'll store them in two variables we defined earlier we then clear our LCD display and will print the temperature on the top line so we'll set the cursor at zero zero print the word temp in a couple of spaces print the actual temperature and then a space and a/c because we are measuring our temperature in degrees Celsius then we'll move to the next line we'll set the cursor down to the beginning of the next line will print humid with a space after it print the humidity value and then a space and a percent symbol and then we simply go back up and repeat the loop over and over again so every two seconds we should get a new temperature and humidity reading so now that you've seen the sketch let's take a peek at our temperature and humidity sensor in action okay here's our temperature and he made of these setup an app tune and as you can see it seems to work pretty well it's reading the current temperature and humidity in the workshop which as you can tell is a fairly pleasant twenty one point eight degrees Celsius and 40.2% humidity if you'll notice the display is flashing every couple of seconds and you'll occasionally see it refresh itself with a different number as it's taking a new reading about every two seconds so now that we've seen that let's move on to some other experiments now for our final demonstration I'm going to tell you how to use one of these LCD keypad fields these are very popular fields for the Arduino they have an LCD display a sixteen by two identical to the one we've been using plus they have a number of push buttons here five buttons plus a reset button now like any arduino field this this plugs into the top of an arduino so i've got an email over here it'll also work on omega and they brought up the unused connections to a bunch of solder pads and you can solder wires to these or solder terminal strips to these to make additional connections of the arduino but when you're prototyping was something like this it can be a little bit hard to use yes you can solder terminals on to here but by far an easier that is to use another field like this one over here this is called a screw field there are similar fields to this and what it does is you plug this onto the Arduino first so I'll put that on and then you take your shield and plug it into the top of the screw shield like so and so now you have a number of terminals over here with little screws on them and you can connect wires to all of the different terminals on the Arduino so it exposes all the terminals even though you've got a shield on top so this is very handy for prototype into something like this so let's take a look at how this LCD keypad field works and then I'll show you a sample sketch that you can use to demonstrate its operation the LCD keypad shield provides a convenient method of adding a liquid crystal display along with a number of keys to your Arduino project in addition to the LCD display the keypad consists of five push buttons plus a reset button the field also brings out the unused connections to the Arduino to solder pads so that you can use them in your project the arrangement of the five push buttons on the keypad shield is rather unique instead of using digital i/o ports there is a resistive divider array that is connected to an analog input port on the Arduino each push button will deliver a different voltage to the analog input port and you can use your code to determine which button was pressed the LCD keypad shield uses the following connections to the Arduino analog input a zero is used for the push-button array pin four is used for data line four on the display then five is used for data line five on the display pin six is used for data line six on the LCD display and pin seven is used for data line seven on the LCD display pin 8 is the RS line to the LCD display pin nine is the enable line to the LCD display and pin 10 on the Arduino is connected to the backlight LED on the LCD display now here's a sketch we can use to demonstrate the operation of the LCD keypad shield will start by including the liquid crystal library and then we'll set up an LCD object based upon the pin notes that the keypad shield uses next we define a number of constants each constant represents one of the push buttons we also have a constant if none of the buttons have been pressed we then define an integer to hold the value of these constants it'll represent the current button that has been pressed we define another integer to hold the analog value that we read from the a zero pin when a push button has been pressed remember each button will give us a different voltage level next we define a function to actually read the buttons we call it read LCD buttons and it's going to return an integer now in our function the first thing we do is we read the value of analog port a zero which is where the push buttons are now these are the values of the manufacture States will happen when you press the various buttons we're going to add 50 to each of those values just to be certain because there are in tolerances and the resistors and all that now in the first line if we get a value of over 1000 then none of the buttons have been pressed and we'll return the button none value the value is under 50 then the right button has been pressed if that doesn't evaluate we check to see if it's under 195 and that means that the UP button has been pressed and we continue that for the other buttons if we don't get a valid response will also return a value that says no button is impressed now we move on to our setup we set the LCDs display for a sixteen by two display on the first line we set the cursor to the first position and we'll print a message on the first line that says push a button then we go into our loop we go to the second line ten spaces over and going to display on this line a counter that counts seconds since the project has been reset this way we can demonstrate the use of the reset button which isn't one of the buttons tied to the resistive array but it's just tied to the reset and on the arduino now we go back to the beginning of the second line and we're going to call the function that we define to read the buttons and we'll get a value that we place into the LCD key variable then we'll use a switch statement based upon the value in that LCD key so if we get button right for going to print right and then break out of the switch statement if we get the left value then we'll print left and again print break the up value will print up etc etc through all of the buttons and then we just repeat the loop over and over again remember every time we repeat the loop we're going to display another second until we press the reset button so now that you've seen the sketch let's take a look at it working so here's our keypad test right now it's displaying that I've not pressed any buttons and you can see the counter on the side counting up the seconds now I'll just press a button that's the UP button and as I hold it down it says up when I release it it says none down button the right button the left button and the select button now if they hit the reset button you'll notice that my counter goes back it starts counting from zero and that's our LCD keypad demo and so there you have it LCD displays are a very effective way of adding a display to your Arduino project they're inexpensive and very easy to use now you will find an article on the drone bot workshop comm website that goes along with this video and it's got more details than what I've covered in the video as well as the sketches that I've used and links to things like the new liquid crystal library that you'll want to use for your eye to see displays and also for your regular connected LCD displays because you can use all of the code we saw in the example code with the new liquid crystal library for improved performance now if you have any questions about LCD displays let's please leave them in the comments below I love getting your comments and I do try to respond to them as often as possible and if you haven't yet please subscribe to the channel I would appreciate that a great deal until next time take care of yourself and I hope to see you soon in the workshop good bye for now [Music]
Info
Channel: DroneBot Workshop
Views: 1,233,282
Rating: undefined out of 5
Keywords: Arduino, LCD, arduino LCD, arduino lcd tutorial, arduino display, LCD1602, LCD Keypad Shield, arduino with lcd tutorial, temperature and humidity arduino, display lcd 16x2 arduino, arduino lcd code, LiquidCrystal, NewLiquidCrystal
Id: wEbGhYjn4QI
Channel Id: undefined
Length: 46min 22sec (2782 seconds)
Published: Mon Mar 19 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.