Connect I2C display with Raspberry pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so before start the actual project explanation I request you please subscribe my channel so you can see on the screen up till now I have uploaded more than 66 video on Raspberry Pi the Raspberry Pi with iot that is all this video then Al also iot with ardino all these video are 26 and recently we started the new series on the pck My Controller before that I also cover the project on the python web application so if you want to Learn Python iot Raspberry Pi ardino P from the scratch and from freely then please subscribe my Channel please support me and the most important part is whatever the code I have explained whatever the project I have created on this YouTube channel all this project are freely available you no need to pay anything for this project so just if only point is you should watch complete video and you should follow my process so if you want to learn something from the scratch and freely then support me and please subscri my channel and please click on like button hello friend in today's video we will learn how you can connect the i2c display with Raspberry Pi so you can see on the screen I have successfully connect the i2c display by using four pin with the raspberry pip so in this video we will learn the program part of program part of this project also we will see the hardware connection also we will see how you can enable the ITC functionality of the Raspberry Pi addition to that in my past project I use this GP board so basically for this you have to design the circuit on the bbard or on the Zer PCB but I got the many comment from the many subscriber sir please replace this Circuit by the i2c display so that it will be easy so I accepted the request so in this video what we will do in front of you I will change my existing Co any project code uh which having this LCD and then that LCD will be we will replace by this i2c LCD so you you can see on the uh you will also learn in the live how you can change the code of my past project and you can use this it Toc display so that complete part we will see in this video so please watch this complete video so that you will get idea about each and everything about this project okay now we will connect the hardware to Raspberry p that is LCD so basically when you purchase this LCD from the market you will get this board that is i2c board and the LCD so if you have the LCD at your home then no need to purchase this LCD again you can just purchase this i2c model because I have just purchased this i2c model only so after you purchase i2c model how to connect this i2c model to your LCD it is very easy so you can see on the i2c model at the first pin there is a square box you can see there is square box you have to just connect this square box pin with the first number pin of LCD so this is you are this is your first number pin of LCD and this square box should be connected to first number pin of LCD so like this so like this you have to connect okay and after you connect make sure that your i2c model should become come at the back end of your LCD it should not be visible when you uh when you hold LCD like this so it model should not be visible so like this it is very simple connection now on the i2c model there are four pins ground pin VCC pin sdn and the circuit design of i2c with Raspberry p you can see on the screen you can follow that circuit diagram okay so first you have to connect the ground pin to Raspberry Pi ground pin now this is the Raspberry p so Raspberry p first pin you can understand Raspberry Pi first pin is come with the power supply you can see here then second at this end whatever the odd number pin should become come at this this column and whatever the even number P come at this column so there are two column you can see when you hold Raspberry p like this there are two column so odd number pin all comes here even number pin all comes here so we have we have to use six number pin this one it is the ground pin of Raspberry Pi then four number pin it is the VCC pin then three number pin of Rasberry P you can see that is should be connected on the uh SDA pin of your i2c module so this is the SDA you can see this is the SDA pin of i2c module and SC pin should be connected to five number pin of your Raspberry Pi so like this we will do the connection now first connect the ground pin of uh LCD model to Raspberry Pi so so this is my ground pin so this is the ground pin first ground pin that is connected to six number pin of Raspberry Pi okay this part completed now VCC pin so this is the VCC pin that should be connected to four number pin of Raspberry Pi okay that is also done okay after that SDA pin so this is the SDA pin that should be connected to three number pin of Raspberry Pi and then after that pin pin should be connected to five number pin of Raspberry Pi so this is my five number pin this is my three number pin I will again connect three number pin five number pin okay so like this we have connected now I will give the power supply and then we will see whether it is working or not so this is my HDMI cable I just connect here and then I will give the power [Music] supply okay now I run the code so you can see it is working perfectly so I again repeat the connection it is very simple first VC pin ground pin should be connected to six number pin of Raspberry Pi then VCC pin should be connected to four number pin P of Raspberry Pi then SDA pin is connected to three number pin of Raspberry Pi and HCL pin should be connected to five number pin of Raspberry Pi so this is only easy and very easy circuit you can you can again run the code you can see it is working perfectly okay so that's the idea behind this i2c and LCD model now we will see how you can replace this model with the raspberry how you can replace this model with the ITC model we will change the code first we will see what are the different types of Library which is used for this ITC model to run the run the [Music] project now we will see the programing part of this project so before that first you have to download my folder so this is my folder you can see this folder you can download from my Google Drive from my web page link the web page link you in the description so in that folder you will find the two files so basically first file is a command which you have to run to install the ITC library and second file is a program to check your ITC LCD is working or not so first we will see how you can enable the i2c functionality on your Raspberry p so for that what you have to do you have to go to the uh Raspberry Pi then go to the preference es and go to the Raspberry Pi configuration so after that go to the interface and here on the it to see you will see here enable at my end but at your end you will see disable so click on enable click on okay and after that reboot your system uh just restart your system okay once you enable the i2c model from here next part is we have to run the some commands on your Raspberry p so that i2c uh LCD package will be installed so first point is just check your internet connected with your Raspberry p or not from here then after that open my command file double click on that one so after that this file will be open then you have to run one by one command like this all this command you have to run so just open the black terminal window and after you open the black terminal window you can see copy the first command from here and paste here then press enter then after that your package get installed uh wait for some second I already installed so it's showing me some warning then again copy the second command from here copy from here again open this terminal right click paste and enter so again second package will be installed I already installed uh then copy the third command from here like this copy and paste and P and press enter so my this package is already installed so it is showing some warning so just ignore that one but at your in it will work so like this you can run one by one command uh uh after that what you have to do you have to copy the fourth command this one copy the fourth command and paste here and press enter so if your i2c module is working perfectly and your pin connection is correct then you will find the address of your LCD like here so you can see my address is 27 if your connection is not okay then here you will see all the the blank that means please check the connection I will show you how how you check that one wrong address so first for example I have remove my so what I will do I will remove my one pin from the t2c modu okay I have removed now again I run the command so you can see it is showing blank that means the connection is incorrect now I will again connect the wire after that I again run and press enter then it will show my address that is 27 number so this number is very important so like this you can first verify your i2c modu is working or not another point if again if your connection is okay all all things are okay and still it is not showing your connection then what you can do you can again open the terminal window and copy the last command raspberry y configuration and and paste here and from here you can go to the interface option interface option then here from here you can go to the i2c then click on yes and click on okay and then press tab tap enter that means you can finish this setup and again you can check this one so it will show now this time it will definitely show so this is the way first you install the the ITC model one by one like this and then we will see the now program now to check the program you can see I have already program here just double click on this program so once you double click program will be open in Tony browser and just here if the value is zero then you can change to the one and then your address my address 27 whatever number there let's say your number is 26 you can give 26 whatever number you can give here 0 0 cross 27 or 0 cross 26 so that number you can give here everything will be same as it is then here you can provide your name also this is run time you can change and this is provide the name in between these two colum so basically here what we I have done imported the package and time library and then uh configure the ITC model the LCD clear clear the LCD and LCD string uh that mean print on the first first line then switch to the second line then on the second line it will show R so welcome rul and then sleep 1 second delay so just click on run button if everything okay then here it will not show any error and your LCD start working at the back end I will show you my LCD is working right now so you can see on the second screen welcome R is printing there so that mean my LCD is working perfectly so let's say if any connection is removed by mistake let's say I remove the connection and again I run the code so after I run the code you will see this input output error so that mean your connection is wrong so please check the connection so this is very basic step to check the ITC model and with this your first it Toc with Raspberry Pi uh project is completed now we will switch to next model that how to replace my earlier LCD model with the ITC [Music] model now in live we will change the code so this is my one project electronic voting machine project so in this project uh we will change the code in front of you so that in future if you want to change the code you can follow these steps as it is so I open the project so first what you have to do you have to this is two code first is my LCD Raspberry p normal code and this is my electron machine project code so just copy this first to first line this line you can copy and paste into face recation code enter press here time is already there so I I did not copy that one then after that uh uh wherever the LCD part just replace that LCD just delete that part so let's example let's say this LCD part so I will remove this code which is not required right now so I remove this part okay okay so I remove that part now next part is uh LCD this is LCD this is LCD so wherever I found the LCD in the code I just replace that one delete that one so so I deleted this part I deleted this part okay yeah so LCD pin I deleted that so live you will check how to change the code then after that LCD LCD wherever you find the LCD just replace just delete we don't require that part right now so delete then this all these are LCD LCD pins so delete delete LCD function delete delete all this LCD function toggle also delete LCD string also delete from the code till LCD init LCD init you can delete okay then LCD string welcome electronic machine uh we have to replace this later so then after that where is the LCD part this one so this one is printing so we will replace that part so this is also printing so we will replace that part later okay so whatever the main LCD function uh we have deleted that one up till now so what we will do now we already copied this so this line we have to copy second line you have to copy and paste into the project anywhere you can paste so likewise I I'm pasting here that line okay so this line I have pasted here now after that what you have to do LCD clear this line you can copy and again you can paste after that line so like this two lines we pasted so initially we deleted all the function which is already available into this code now we pasted the this line now next is only we have to print and this okay so so what you can do go to the line where printing is there so like this LCD string is printing welcome on the line one so we have to replace this with the our line so let's say welcome I will copy from here okay now what you have to do you have to delete this line again so LCD it is from the old code so delete that line so delete this line then after that LCD string it is old code line so you have to replace with the new code LCD right string so copy this right string from here and LC right string you can see copy this copy this and paste here okay after you paste after you uh paste that line copy electronic name and paste here and then delete this line old line so likewise all the one by one line you have to first copy and paste and delete the old old line so it will replace so likewise this will done now it is printing on second line so how to print on second line you have to copy this command so this command will be print on the second line so paste here then after that enter again again copy LCD right string it is very simple and paste again here after that oting machine you have to print so copy this copy this message voting machine and add here then after that delete this line so likewise we replace the code so then before that one before this every first right you can give the LCD clear so it will clear the LCD so it is just best practice so copy this LCD clear and paste here again it is the first line of LCD so I will paste here so we replace that code with the old code now here now again go to the next here also same thing you have to do first delete this line no need this line okay so first delete this line after that delete you can make as it is then you have to print Val valid person you have to print on the LCD so how to print first copy this LCD clear every time when you're printing on the first line clear we have to enter and paste then again enter then copy this LC string and press again enter here then valid person you have to print so copy this and instead of Welcome paste here again delete this line so we don't require this line so delete this line then again you have to print give out on the second line so how to print second line very simple I told you copy this command and paste and then you have to print this so again copy this and first paste here so after that press enter and first paste that one sorry this one till this you can copy and then after that you can paste then after that you can copy this give copy and again replace this okay and again delete the old line so whatever the old that one I will delete so you understood right how to replace the old line how to replace the old LCD code with the i2c code so in this way you can replace and run the uh code if there is no issue then it will run so now I will run the code okay now I run the code just click on this run button if there is no issue you can see uh there is no issue on the code right now okay it is working I can show you on the second screen you can see electronic Ting machine and project also start working the camera open so likewise you can see this is the extra space I will remove the extra space no needed S I will again remove this extra no needed so this extra space means one character in the LCD so remove that one now again I run the project and you can see on the LCD also it will print welcome electron cting machine that is I2 LCD welcome electronic oting machine you can see so in this way we successfully uh completed this video so I replace the old code with the new LCD i2c moduel that also successfully run I told you how to compile this software how to enable the ITC model how to install that Library how to change the code so I hope you understand if you have any comment you can contact me on my WhatsApp number the WhatsApp number in the description thanks for watching this video
Info
Channel: Rahul Jadhav
Views: 998
Rating: undefined out of 5
Keywords: i2c lcd arduino, i2c lcd not displaying text, i2c lcd display, i2c lcd connection, i2c lcd not working, arduino i2c lcd display tutorial, arduino i2c communication, arduino i2c lcd, arduino i2c tutorial, arduino i2c programming, i2c lcd with raspberry pi, raspberry pi i2c lcd, raspberry pi i2c tutorial, raspberry pi pico lcd 16x2 i2c, raspberry pi pico i2c, raspberry pi oled display i2c, raspberry pi pico i2c display, raspberry pi i2c display, raspberry pi lcd display i2c
Id: S-wjRBeyJXk
Channel Id: undefined
Length: 23min 33sec (1413 seconds)
Published: Sun Nov 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.