Arduino Tutorial #4 - LCD displays, Libraries and Troubleshooting

  Рет қаралды 272,867

mjlorton

mjlorton

10 жыл бұрын

programmingelectronics.com/ar...
----------------------------- Click "Show more" ------------------------------------------
A tutorial on interfacing LCDs (liquid crystal displays) with Arduino. We take a look at libraries and the role they play...and the potential issues, errors and troubleshooting involved.
We look at several types of displays but concentrate on the 4x20 Sparkfun serial enabled LCD display.
SparkFun kit from my Amazon Store:
astore.amazon.com/m0711-20?_en...
A link to the SparkSoftLCD library for the Arduino by C. A. Church - fixes issue with float variables on serial enabled LCD displays:
mjlorton.com/forum/index.php?t...
Link to new Arduino software / IDE 1.0.5:
arduino.cc/en/main/software
Link to the LiquidCrystal library with examples and wiring:
arduino.cc/en/Tutorial/LiquidC...
Link to the SparkFun SerLCD 2.5 datasheet:
www.sparkfun.com/datasheets/L...
Link to the Hitachi HD44780U dot-matrix liquid crystal display controller datasheet:
www.sparkfun.com/datasheets/L...
SparkFun LCD displays:
www.sparkfun.com/categories/7...
How to install Arduino libraries / Installing Additional Arduino Libraries:
arduino.cc/en/Guide/Libraries
How to create a library for Arduino / Writing a Library for Arduino:
arduino.cc/en/Hacking/LibraryT...
Troubleshooting compiling errors:
error: WConstants.h: No such file or directory
error: Wires.h: No such file or directory
Change / point library to Arduino.h
------------------------------------------------------------------------------------------------------
My website and forum:- www.mjlorton.com
Donations and contributions:- www.mjlorton.com
My techie channel MJLorton - Solar Power and Electronic Measurement Equipment - / mjlorton
My Techie Amazon Store: astore.amazon.com/m0711-20
My other channel VBlogMag - For almost any topic under the sun! - / vblogmag
My VBlogMag Amazon Store: astore.amazon.com/vblogmag-20
------------------------------------------------------------------------------------------------------
===================================================
Video sponsor, Pass Ltd - their websites:
At checkout use the discount / promotion code "mjlorton" for 5% off.
www.tester.co.uk/?cmid=QmhzQjc... - Test Equipment and Test-meter suppliers and
www.calibrate.co.uk/?cmid=Qmhz... - Calibration and service of test equipment
===================================================
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Bitcoin (BTC) Donations: 1K7PeF55e7ssE7W3WVCoa7c4j2PHzy6ASv
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
**********************************************************************************
Music clip from PatternMusic by Richard Lawler
www.PatternMusic.com
(used under creative commons Attribution-ShareAlike Unported 3.0)
creativecommons.org/licenses/b...
**********************************************************************************

Пікірлер: 147
@mjlorton
@mjlorton 10 жыл бұрын
Thanks for the feedback...it lets me know that it's worth the time and effort doing them. Cheers, Martin.
@mjlorton
@mjlorton 10 жыл бұрын
My pleasure, thanks for the feedback.
@mjlorton
@mjlorton 10 жыл бұрын
Thanks Mohammed. Reading the analog signal will be part of the next tutorial as that is required for reading the voltage (analog) and converting to digital. Cheers, Martin.
@Michaelxl14
@Michaelxl14 10 жыл бұрын
Awesome, so glad you could resume this series!!
@matiaspoutiainen4362
@matiaspoutiainen4362 9 жыл бұрын
Thanks mjlorton for another comprehensive video. This exactly what a starting Arduino addict is looking for in youtube!
@mjlorton
@mjlorton 10 жыл бұрын
Good question...there was a fair bit of input and I've not had the time to evaluate all of it. I will also do some further research so I have a better understanding myself.
@professormariadiaz
@professormariadiaz 7 жыл бұрын
Thank you so much for helping me solve my problem. Within 10 minutes you provided a solution for a problem I've been trying to work through for hours!
@TheFunkman
@TheFunkman 10 жыл бұрын
I am designing a program to run an old Ramsey FX-50. Your tutorial will help me get it to work. Thanks again!
@Joe_Robins
@Joe_Robins 10 жыл бұрын
great video, really helpful. I'm new to electronics and got an Arduino this Christmas so have been having a blast playing around. These videos have really helped!
@rverm1000
@rverm1000 10 жыл бұрын
nice job putting in all the details about code compiling errors
@beehive808
@beehive808 10 жыл бұрын
I have a very hard time with Libraries and Troubleshooting them, thanks for the video. I can't wait to see the next video. Ron
@meirbns
@meirbns 10 жыл бұрын
Many thanks for the excellent presentation. This is the second tutorial from you I looked at.
@mjlorton
@mjlorton 10 жыл бұрын
Thanks Rob..I did fall off the edge for a while...I had a hard drive fail in my PC so I lost several days sorting that out...back on track now ;-)
@grumich4084
@grumich4084 9 жыл бұрын
All I can say is ... "brilliant!" You went into things I already knew, but you made me see them much better about "libraries" and Arduino; I've been using libraries, well, let's just say for a long time, before Arduinos certainly. But again you explained it excellently AND what I liked most was a way to reduce those pesky "Warnings" you seem to inevidently get. Never seems to cause a problem but I've never written on a platform before that was so, I dunno, "casual" about issuing warnings, and I didn't like 'em. So that you VERY much for that tip, and the many others in this video. :)
@mjlorton
@mjlorton 9 жыл бұрын
Grumich My pleasure! Thanks for the post.
@anthonyjawili9066
@anthonyjawili9066 8 жыл бұрын
Thanks for sharing. Your video taught me lot about acquiring and using libraries. Furthermore creating my own library would be awesome.
@TheGlassmith1
@TheGlassmith1 10 жыл бұрын
Thanks for the excellent video on libraries and serial displays. Also like your LED work lights on your bench. I desparately need to incorporate this idea into my shop. Roger...
@rayscrafield2106
@rayscrafield2106 7 жыл бұрын
I did pretty well through the first couple of videos but being a real newbie I am totally out of my element on this one. I'm going to move on with my basic learning kit and come back to this once I have a better grip on the basics. Thanks for your efforts. I shall return.
@defariase
@defariase 9 жыл бұрын
Awesome details and explanation! Keep up the great work. Thanks. Cheers, LD
@Avionics1958
@Avionics1958 10 жыл бұрын
Very clear explanation especially on constructor lcd you cleared a lot of my questions. thank you and thumbs up
@chrispychickin
@chrispychickin 10 жыл бұрын
Great video Martin! It's very much worth your effort to do basic stuff like this IMO, its very newbie friendly, but goes in reasonable depth too. I'm sure a lot of people have gained something from this one, and I hope there's more like it on the way. Videos like this are why I'm not keen to un-subscribe from your channel, even if some of the other videos aren't really to my taste. Have a good one! chris
@RobB_VK6ES
@RobB_VK6ES 10 жыл бұрын
Back on track Martin, great to see and a most useful tutorial. Definitely worth the week wait between episodes although I was worried you had fallen off the edge of the world :)
@mjlorton
@mjlorton 10 жыл бұрын
Thanks Rudy...yes...I hope to get back on the air waves in a month or so once we move into our own home,
@scotttaylor215
@scotttaylor215 9 жыл бұрын
I think this will help with setting up my new Arduino with lcd, very good job.
@imcleod20
@imcleod20 4 жыл бұрын
Very good Martin, this info is what I needed. Thanks.
@Laphroaig16
@Laphroaig16 10 жыл бұрын
Hey Martin, just caught this vid today, very good. The level of detail is great and explanations are clear. I have also watched the other Arduino vids and enjoyed them immensely. Its clear you put a lot of time and effort into your vids which I am most greatful for. Thanks for sharing your knowledge.
@williamyoung584
@williamyoung584 7 жыл бұрын
Thanks for the insight. This was very valuable for my overall understanding of basic programming languages.
@ISmellBurning
@ISmellBurning 10 жыл бұрын
Whenever you see a #, its called a pre-processor directive. It's not actually part of your compiled code. Its actually telling the linker / compiler to do something (like include a header file) before compilation. So, that code says "If "ARDUINO" is already defined, and its greater than (ie, newer than) version 100, include the header file "Arduino.h", but if "Arduino" ISNT already defined or is an old version (less than 100), include the header file "WProgram.h". I hope that explains :)
@mattd28
@mattd28 10 жыл бұрын
Fantastic tutorial, thanks!
@cadman3190
@cadman3190 6 жыл бұрын
very good i been watching you for years
@kresimircoric2503
@kresimircoric2503 7 жыл бұрын
Excellent work that is helpful for beginners. Thank you very much !
@angelmiergarza
@angelmiergarza 9 жыл бұрын
Excellent tutorial ! You do a great job as a teacher Congratulations
@thebleekeboy
@thebleekeboy 10 жыл бұрын
Fantastic tutorial, its a verry clear explanation, verry use full information,that il be need in my projects. tanks for posting this on youtube
@z66z66
@z66z66 8 жыл бұрын
You cursored every bit of my mind, thanks a lot!
@tmc200527
@tmc200527 10 жыл бұрын
Good intro to an Arduino project. 37 min went by fast so it kept my interest.
@shiva4apple
@shiva4apple 9 жыл бұрын
it was really useful ...you helped me my in my project..THANK YOU!
@nivedmukundan2992
@nivedmukundan2992 10 жыл бұрын
thanks for all the videos ! It helped me a lot!
@ggattsr
@ggattsr 10 жыл бұрын
Thanks for another great video. Please keep them coming. Cheers!!
@MkmeOrg
@MkmeOrg 10 жыл бұрын
Absolutely fantastic tutorial. Nicely done. I'm building an Arduino data logger currently on my channel- next up is trying to do some graphs on the Nokia 5110 LCD :) Cheers
@chrisj3936
@chrisj3936 10 жыл бұрын
Excellent content, the first port of call for every novice Arduino user, should be on the Arduino site!! Chris
@mjlorton
@mjlorton 10 жыл бұрын
My pleasure, thanks for the post.
@obregr
@obregr 10 жыл бұрын
finaly somthibg new in aeduino,im looking for new one keep upagood work
@liamduncan09
@liamduncan09 10 жыл бұрын
Excellent thank you that was the best help I have found.
@derickchapman6451
@derickchapman6451 7 жыл бұрын
Thank you your videos are very helpful
@mjlorton
@mjlorton 10 жыл бұрын
Thanks!
@banyar82
@banyar82 10 жыл бұрын
good job buddy. thanks for your sharing.! great video and i like your work bench ,btw.
@glynnhm0lsg308
@glynnhm0lsg308 9 жыл бұрын
Well explained for us beginners
@HillOrStream
@HillOrStream 10 жыл бұрын
Nice solution. Thanks for the detail, I'm pretty green so the explanation was very helpful.
@TheBadFred
@TheBadFred 10 жыл бұрын
Very good Toppic!
@rubenson9653
@rubenson9653 9 жыл бұрын
i love your videos but am horrible at giving feed back but just had to say thank you for taking time to make them very useful
@MrDylanfabre
@MrDylanfabre 10 жыл бұрын
yay it finally came out
@Ju00Ls
@Ju00Ls 10 жыл бұрын
Very enjoyable video!
@ieMalik
@ieMalik 8 жыл бұрын
hi Martin Thanks for the best videos the best thing about your videos is the accent and clear voice and the sound volume which is much better in your videos than others, I would appreciate if you can also make videos about how to test laptop, pcb boards, and mobiles phones motherboards to test with multimeter it is big industry and there no such best videos to follow so maybe you can try and hope it will got well and we will all learn from it Regards Malik
@SeattleRingHunter
@SeattleRingHunter 10 жыл бұрын
Super tutorial! A+++ mate! Thanks for being so clear and on point.
@mjlorton
@mjlorton 10 жыл бұрын
Thanks very much for the feedback.
@Analyte1
@Analyte1 9 жыл бұрын
Great learning
@samuelrock9
@samuelrock9 10 жыл бұрын
Thanks for such a well put together video. Very helpful :)
@mjlorton
@mjlorton 10 жыл бұрын
My pleasure, thanks for the feedback.
@snaprollinpitts
@snaprollinpitts 10 жыл бұрын
I have to echo so many that have said GREAT VIDEO THANKS mike
@mjlorton
@mjlorton 10 жыл бұрын
Thanks very much for the feedback.
@pcservicelondon
@pcservicelondon 7 жыл бұрын
Hi there! Great educational videos :) i really like your explanations!!! Thank you very much for sharing and helping with education (mine at least!!!)
@donaldfilbert4832
@donaldfilbert4832 8 жыл бұрын
Excellent tutorial!! it pulls a lot of things together for me nicely. One Question. At 13.51. How did you know to use the file name Arduino.h in place of Wconstants.h ?? Is that a specific replacement for Wconstants.h? Or is it a catch-all replacement for any updated file/library that might be missing? Where did you discover/learn this?
@malgailany
@malgailany 10 жыл бұрын
Driving an LCD properly might be a tedious task, this tutorial makes it easy to overcome lots of the difficulties especially if we want to modify the existing fonts. Thank you Martin. PS. Can you make another vid about reading analog signals?
@skizgrzl
@skizgrzl 10 жыл бұрын
"lcd" isn't a "constructor" as you called it, it's an object, which is instantiated from the class in sparkfun's lcd library, and what you called an "instance" is actually a method. (object oriented speak for function) Figured I'd mention that since that's what everyone knows these things by. Contruct is actually the method that fires once when you instantiate an object from a class automatically. Figured I'd mention this so that people don't get confused with incorrect or archaic terminology.
@Graham1904
@Graham1904 7 жыл бұрын
Why did you use the WordPad as the editor when you changed the header file reference to Arduino and not some other editor that would display the CPP file in a more user friendly fashion and make it easier to read?
@tamgaming9861
@tamgaming9861 6 жыл бұрын
Hello Sir, i am searching for an way to make a menu with my hardware keypad (12 micro keys) and use it to change values and so on. Do you have a tutorial for it? Thanks in advance and for all your videos which helped me so much in the past!
@qzorn4440
@qzorn4440 2 жыл бұрын
one cooool workbench... if you are in the UK, you should be in the 007 Q lab for QoooL...:) i really like these videos and it is good to see different vids on the same subject...😊
@frostlife
@frostlife 8 жыл бұрын
Hello, what exact Serial Enabled LCD Display are you using at 24:00? Thank you.
@aramachemyan3035
@aramachemyan3035 7 жыл бұрын
Thanks
@myanimation3609
@myanimation3609 8 жыл бұрын
You so good job thank you
@murphybahalla6429
@murphybahalla6429 10 жыл бұрын
Hi, I'm planning to use arduino to control my solenoid. Can arduino be programmed to react with smart card reader(VB.net) as my trigger in solenoid?
@matteroftim3
@matteroftim3 7 жыл бұрын
Can I just use a serial to parralel shift register and use a parralel display?
@taneilman
@taneilman 10 жыл бұрын
Thank You
@profesorultraznit
@profesorultraznit 8 жыл бұрын
Absolutely Great for me as a beginner . THANK YOU . Do You have a Video Tutorial about how to show Time from RTC3231 to an LCD1602 . Or at least how to combine those 2 library . Thank You for Your time . All the Best .
@HillOrStream
@HillOrStream 10 жыл бұрын
Think I mostly understand though not sure how the first line does the switch, guess would have to look at it in context. You should make videos!
@nuchpolsoeksiri7251
@nuchpolsoeksiri7251 8 жыл бұрын
thank you
@coatduck
@coatduck 10 жыл бұрын
Fantastic tutorial, but it should be mentioned that LCD stands for Liquid Crystal Display, thereby making LCD Display redundant. (Liquid Crystal Display Display)
@RobB_VK6ES
@RobB_VK6ES 10 жыл бұрын
I'd be picking Alans brain. He has forgotten more about scopes than the rest of us ever learned
7 жыл бұрын
Im using I2C and have the library but getting error my lcd is 2x16 and using esp 8266, any ideas? i found the address for i2c device with a i2c scanner and still not got it working, plz help.
@austinchilders4955
@austinchilders4955 9 жыл бұрын
When you upload a code to your arduino does it pull all files and libraries referenced in that code
@mallikisti
@mallikisti 6 жыл бұрын
Its a good tutorial. But I would like to have the similar tutorial with lcd display which is not serial.
@EscapeMCP
@EscapeMCP 8 жыл бұрын
Get Notepad++ for all of your .c, .h & .cpp editing. Much easier than Windows notepad!
@wolframiopulstar1542
@wolframiopulstar1542 7 жыл бұрын
hello i am using a i2c adapter for the LCD and its works when LCD smartie send data whith a sketch that i found on internet, but each lines start with a G and 2 squares garbage characters..., what can be?
@suhailha
@suhailha 10 жыл бұрын
thanks a lot for the video. you are great. I bought this LCD, and I have a problem that I am not able to fix. The LCD shows black squares in the 1st and 3rd row no matter what I do. do you have any suggestions or ideas how to resolve this problem?
@f1adore
@f1adore 10 жыл бұрын
if u had a basic lcd on a machine that the lcd failed how would u replace it with a serial enabled lcd?
@Rodfraeser
@Rodfraeser 10 жыл бұрын
Can I use 8-pin ATtiny chip for that lcd ? Thanks for toturial Regards JJ Denmark.
@rverm1000
@rverm1000 10 жыл бұрын
can the arduino bootloader and program be ported to other atmel chip. if not would I half to go into the header and cpp file to tell it which chip is being used?
@ibrahimzabalawi7051
@ibrahimzabalawi7051 10 жыл бұрын
Good Job:)
@Alex-mq2zk
@Alex-mq2zk 8 жыл бұрын
any info how to setup a lcd to a teensy 3.2 u cant seem to find anything :(
@joostvanpoppel
@joostvanpoppel 10 жыл бұрын
Im planning on buying the Arduino starter kit, i'm a total electronics newbie. I understand the ARduino Uno is included in this kit. Now i'm just wondering: can I attach 4 LCD's to one Uno? (I want to display different data on each LCD at the same time) And whats the best type of LCD i can buy for this purpose?
@ravinath7551
@ravinath7551 9 жыл бұрын
how to download the Sparkfun LCD??I already register through the website that you showed..
@jcvc04
@jcvc04 9 жыл бұрын
Hi mjlorton. I have the Parallax serial LCD with (RX, 5V, and GND) pins. I wrote code to display on the LCD but it does not work. I don't know if I need to include something in specific to the code to make it work such as: #include NewSoftSerial lcd = NewSoftSerial(2, 6); //Set RX/TX pins for LCD I don't think I have problem with the wiring because is only 3 pins that need to be connected. I am new to this please help!
@MrMarinZanze
@MrMarinZanze 10 жыл бұрын
great video. i like your channel! :)
@n1kkri
@n1kkri 6 жыл бұрын
would anyone know of a external display for a Yaesu FT-817/857 project for a beginner who knows nothing about Arduino. Something step by step document with proven parts and software along with the how to. I would really like to get into to this but everything is beyond my experience. I have no software experience other than using it. Thanks, Ken
@honeyupadhyay9488
@honeyupadhyay9488 10 жыл бұрын
link to all the series of your videos
@sudiptapanda
@sudiptapanda 6 жыл бұрын
Reminds me of Scotty (Star Trek)
@TheFunkman
@TheFunkman 10 жыл бұрын
I cannot find the link to the sparkfun LCD library.
@shamanjitsingh339
@shamanjitsingh339 8 жыл бұрын
Hey I want to use an 16x2 LCD (parallel enabled). But I want to send data to LCD serially. And I want to do series to parallel data conversion using 74164 shift register can u plz tell the implementation.I will be very grateful to you.
@RobB_VK6ES
@RobB_VK6ES 10 жыл бұрын
What conclusions have you come too with the triggering issues of the last T4D
@ing.mecatronicautleon8513
@ing.mecatronicautleon8513 10 жыл бұрын
i did the same you, but when i compile arduino say "SparkSoftLCD doesnt name a type" what i should do?
@ianturner2229
@ianturner2229 6 жыл бұрын
Quick comment re the wConstants replacement. It would be useful if you stressed the capitalisation of Arduino.h as opposed to arduino.h cos as we all know, these names are indeed case sensitive, and a newbie could well get very upset when his newly modified cpp file still does not compile as expected !
@liamduncan09
@liamduncan09 10 жыл бұрын
Just watched this again as I am now able to do a lot more with my Uno's and the display was one of my main concerns but not any longer thanks to you. could you say something about runtime errors and contacting application support as that is what I get every time I try to use the IDE and verify or upload . Hence why I now use browser to load my sketches no problems there. codebenders for any one with the same problem.
@rejeeshn130
@rejeeshn130 10 жыл бұрын
great.......
@ISmellBurning
@ISmellBurning 10 жыл бұрын
As regards the "float variable bit". When you are displaying it on the LCD, its not a float is it? It's a series of characters. If you think in those terms, you'll get less confusion when dealing with LCD libraries. Also remember to the overhead when dealing with floats on an 8 bit mico. GL
@udful
@udful 8 жыл бұрын
I can't find the library that he used even in the website I couldn't find it. Any help please.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 512 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 15 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 3,8 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 8 МЛН
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
SparkFun Arduino Comparison Guide
8:31
SparkFun Electronics
Рет қаралды 1 МЛН
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Рет қаралды 595 М.
The world's worst video card?
32:47
Ben Eater
Рет қаралды 6 МЛН
Controlling 3 Stepper Motors with the AccelStepper Library for Arduino
11:49
Owon XSA vs Rigol DSA Spectrum Analyzer
48:51
mjlorton
Рет қаралды 14 М.
Mechanical  Switches are Obsolete?! Switch to a Latch Circuit! EB#53
10:36
Why build an entire computer on breadboards?
28:43
Ben Eater
Рет қаралды 3,1 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 338 М.
Что еще за съемные фронталки от Vivo? #vivo
0:41
GamePad İle Bisiklet Yönetmek #shorts
0:26
Osman Kabadayı
Рет қаралды 635 М.
Спутниковый телефон #обзор #товары
0:35
Product show
Рет қаралды 2,1 МЛН
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,9 МЛН