"I AM LEGEND". I used "int goButton=2", configured pin 2 with internal pullup, and used "while(digitalRead(goButton));" statement to wait for button press before performing one distance measurement. Thank you so much for your most excellent tutorials!
@paulmcwhorter10 ай бұрын
LEGEND!
@alexnaglich2 жыл бұрын
Made it to episode 60! Excellent lessons, Paul. You are wonderful, you've taught me an amazing life still in a week.
@mohsenr44342 жыл бұрын
Honestly I got a bit lazy and skipped my homework here because I knew exactly how to do it so I just watched the tutorial to make sure I'm not missing out on any new tips. Thank you.
@batticha4624 жыл бұрын
For more accurate measument we can use the HC-SR05 and to calculate the sound speed related to temperature and humidity
@pointer3332 жыл бұрын
Before the pushbutton homework, I did this with the DHT! Except I read from a trusted source that humidity has a negligible effect, so used only temp in speed of sound equation.
@DirkSimilon13 жыл бұрын
Wonderful feeling that all the things I learned, suddenly fit in together. At the start I feared the homework-tasks, now I'm looking forward to them. Allthough this one was a hard one, especially because my laptop sometimes does 'weird' things with the Com-ports... Thank you very much,Paul
@keyboardlearning75522 жыл бұрын
I remembered the hack of using the inbuilt Pull-Up resistor, and used Digital pin 6. Thanks for reminding me to add instructions. I used "Push Btn 2 read", and then, when the button was pressed immediately cleared the display, a an acknowledgement. For the homework, I'm planning on taking 5 readings of distance; Checking for outliers and then averaging the remaining readings. (If I'm left with fewer that 3 readings, I'll have a second go at getting 5 distances. Great video. Many thanks.
@charlielowell40772 жыл бұрын
I AM LEGEND! Homework was a piece of cake! Connected at pin 5, used two additional wires with the switch and (total) seven additional lines of code. Made me think a little though and thanks again for that. This old bean needs all the exercise we can put it through. :-) EDIT: Added two more lines to include "Position Target" on cleared display while waiting for button press. I inserted my initial comment at the beginning of this lesson.
@paulmcwhorter2 жыл бұрын
Fantastic!
@timjpyne3 жыл бұрын
Hi Paul, I am legend. I used a I2C modulo to connect my lcd screen, so I only used A4 and A5 pins for the communications. It has constantly amazed me how quick I have learnt how to program the Arduino. By watching your channel. Before I found your channel, I thought I would never master it. I have even adapted the program so I can measure in metric or imperial (I am from the UK). Also, if you use pinMode (buttonPin, INPUT_PULLUP); it will use internal resister and save a line of code. Thanks for great informative channel. Tim
@pointer3332 жыл бұрын
Your last statement intrigued me. What is the purpose of saving a line of code in an internal resistor? Also, how the heck does a simple resistor store a line of code?! 😄 Or is the resistor providing the load needed for that to happen somehow? I'll have to look into the I2C module you speak of... I had the thought that maybe I could use a serial to parallel converter to do this (I know next to nothing at this point), but it sounds like I2C is purpose built and there's an Arduino library for it.
@Yousif_Maksabo11 ай бұрын
I had the I2C module too which saved me from the real pain lol
@destinyokwong209927 күн бұрын
good to know about this method
@destinyokwong209927 күн бұрын
@@pointer333 i think what he meant was that setting that pin as INPUT_PULLUP will eliminate the need to digitalWrite to the input pin(buttonPin).
@adamcurtice35842 жыл бұрын
I am legend. I got my go Button to work by utilizing the Serial Monitor. Through its use I figured out I was only getting 1 button read. Once I embedded another button read inside my while loop the button setup worked perfectly. I have managed to complete all my homework assignments to this point. Thanks for the wonderful learning experience.
@adriangabris4133 жыл бұрын
Thank you paul. Without a doubt, you are the best teacher that I have ever encountered. I am really happy that I've discovered your channel, It's a gold mine for information
@paulmcwhorter3 жыл бұрын
Wow, thank you!
@Hino_554 жыл бұрын
I am Legend. I did the Go Button using your older method Sir Paul. I did it using comparing the button states...i.e. buttonValOld and buttonValNew. Thank you for this lesson Sir Paul!
@sssagc3 жыл бұрын
OK I am legend. Its one of the most easy of assignments done as it was just an extension to the earlier homework of adding an LCD to read out the distance in cm and inches. Added an "IF" condition to detect a LOW from the push button ( which is held HIGH in Void Setup to act as a current limiter ) which then begins the cycle of measuring the distance and outputs the results to the LCD. By disabling a lcd.clear() statement at the bottom of the code from the previous assignment, the LCD retains the data when the finger is lifted of the button switch. Now ... to watch the rest of this video ...
@kevhopkins9844 жыл бұрын
Managed most of the homework, enjoyable tutorial. Answer to your question: shorten the pulse time on the HC-SR04.
@jefftech8497 Жыл бұрын
I am leg....so close! I danced around with researching the code, saw an example of this but discarded it. I had everything but the right while statement. Thanks Paul!
@steamarduino49424 жыл бұрын
I am Legend. I rearranged the pins and used D2 for the pushbutton - no need to use the analog inputs. I also used if else rather than while to trigger the pushbutton. Keep up the good work, Paul! I have a miserable record with completing MOOC courses, but I'm proud to be at Tutorial 60 and going strong.
@franciscoserafim77932 жыл бұрын
I arrived late to this tutorials but it´s has been a pleasure to follow your teaching abbility. I´m also a teacher (physic and chemistry). In this particular video i stopped at 1´43´´ to write that "I am a legend". I used a Button Pull Up Pin and then I put all the code for the lcd and the HC SR04 inside a while cycle that only works when ButtonValue is 0. Many thanks.
@frang342 Жыл бұрын
Hey paul, I just finished lession 60 and I'm walking around with my portable distance sensor measuring everything. This is really cool,it feels great to see it all come together and work like its supposed to.I have started with your tutorials from number 1 till now and have learned a lot. I am now able to set up my programs and test all the different sensors i own along with a lcd to see everything come alive on the screen. It's been a wonderful experience. Thankyou Paul for taking the time and having the patients to show us how its done.
@paulmcwhorter Жыл бұрын
Excellent!
@erikburman5302 жыл бұрын
I did it! Now I'm finding that I don't have to go back to old lessons to remember how to get things done. My memory was a bit fuzzy on the push button process but because you showed us in detail how to read pushbuttons I remembered the theory and was able to reason it out on my own. Fantastic!
@paulmcwhorter2 жыл бұрын
Wonderful!
@michaeldalfonzo39123 жыл бұрын
I did complete it and got it working just fine. This was a pretty easy assignment. Really enjoying these lessons.
@paulmcwhorter3 жыл бұрын
Great job!
@jimlabissonniere74004 жыл бұрын
I am legend.....took a couple of hours, then I realized I couldn't use D13 , but I got there.....great project, Thanks Paul!
@ABSP57664 жыл бұрын
I am legend! I used an if statement instead of the while, but the rest was very similar. Paul, I am totally hooked on your course. As a matter of fact, I need to do something else, and every day I promise to myself to follow only one of your tutorials, but I end up doing three or four, or even five, a day.
@electronichome11532 жыл бұрын
Looks like you have plenty of time... Congratulations!
@amayerstatue Жыл бұрын
I am legend! I also attached the temperature sensor and a button that switches the data displayed. Thank you for these tutorials!
@cbrombaugh3 жыл бұрын
I am legend. I used pin 13 on my Mega 2560 with no problem. Maybe I was lucky that it works? Along with many others, I am still enjoying your most excellent Arduino lessons. They are great at any price, but free is spectacular.
@paulmcwhorter3 жыл бұрын
Good to hear
@richardalexander6332 жыл бұрын
Hi Paul, I am legend. I achieved the homework and understand the code and the components all from the ground up thanks to you. So, Paul McWhorter you are legend too..... Thank you so much for making this series of tutorials and for all you have taught me so far.
@justmc62 Жыл бұрын
Legend- Got the homework done very close to your solution. Used an If & Else statement vs a While one. Also used an Analog pin that according to the Nano documentation will work as a Digital pin via the INPUT_PULLUP pinMode command. Thanks again for another fabulous lesson.
@paulmcwhorter Жыл бұрын
LEGEND!
@aaronmilliman76852 жыл бұрын
Almost pulled ahead on this class but pumped my breaks and finished nicely. Thanks for another great video.
@paulmcwhorter2 жыл бұрын
Great job!
@leebasham11073 ай бұрын
Hi Paul, I am Legend, I did this on my own, I thought about it and realised that i can add the switch, one pin to ground the other to pin8 (butPin) and using pinMode( butPin, INPUT_PULLUP); I could control the LCD display with an if (bitVal==0) . this along with an I2C LCD I usd the lcd.noBacklight() command to turn off the backlight before the if statement then lcd.backllight() turns it on and with a 5 sec delay you have enough time to get a reading. If i want to reduce the power consumption of my PP3 battery i could also use the lcd.noDisplay() and lcd.display() to turn off the actual readings although i suspect that the backlight draws the major amount of the current. Your videos are superb, your teaching style is excellent, I have learnt so much from this series and look forward to each lesson. chers Lee
@Hemangsk3 жыл бұрын
Figured it out! I find myself going back to push button video where you show the simplest way to use a push button. One of these days I'm finally going to be able to keep that technique in back of my head.
@paulmcwhorter3 жыл бұрын
Excellent!
@glennlindstrom90804 жыл бұрын
The assignement forced us to think for ourselves and after some headscratching my friend and I solved the problem, so we are Legend.
@davebroster55602 жыл бұрын
I am legend. Ran out of space on the breadboard for the switch due to the Power Supply module. However I had a small piece of breadboard supplied in of the the kits I bought, so just mounted the switch on that. Worked a treat. Going to get one of those USB power packs to free up some space on the main breadboard. Having watched your explanation I wonder if I've missed something. I'm using a nano and have Pins 4-9 for the LCD, Pins 11 and 12 for the Sensor, which still leaves 2,3 and 10 free, so I just used Pin2 for the switch.
@williamwachter3279 Жыл бұрын
Thanks, Paul! Each lesson builds on previous lessons to give us a repretoire!
@Szienz4 жыл бұрын
did not make it entirely on my own, but close enough then needed the video in the end to trap the code error. Good training as always!
@lorisrobots2 жыл бұрын
I am legend! It was fun to share this project with my family. Now to see how you approached it. I didn't have an issue with pin 13 since I used the LCD with the I2C backpack.
@andywylie2873 жыл бұрын
Giddy UP! Another finest quality, informative, expert tutorial from the most excellent educator, Paul McWhorter. I am really enjoying this journey. Thank you so much.
@paulmcwhorter3 жыл бұрын
Glad to help
@terrymurphy5654 жыл бұрын
I am Legend. I actually wired up both the DHT11 and HC SR04 and added 3 buttons, one for each reading(Temp, Humidity, Distance) I had to use the UNO though, not enough PINs on the Nano. Thanks for another great lesson.
@terrymurphy5654 жыл бұрын
Now I know I could have used the analog pins, guess the Nano would have worked.
@eladioh38583 жыл бұрын
I am Legend ! I also added a Laser sensor as a pointer on one of the pins , makes it a bit more interesting ! thank you so much Paul !!! Another great lesson !!!!
@paulmcwhorter3 жыл бұрын
Nice work!
@jerrypeng82153 жыл бұрын
Thank you, Paul. I use the joystick(button)+lcd1602+HC-SR05 to achieve the function. Your tutorial helps me a lot.
@CarolinaDGF3 жыл бұрын
I am Legend. I love how the lessons build on each other.
@sammysam15034 жыл бұрын
I am legend! I love your videos! They are so amazing! Ordered a raspberry pi and a car kit so that I can do your other tutorials! Its gonna be a long time until I leave your channel, and I hope that time is well spent! Also, I really love your bible boy channel, its very good!
@rickgrear82702 жыл бұрын
I am legend. I connected two breadboards to fit everything for this. Thanks!
@marvinmeng72133 жыл бұрын
I am legend! I had incorporated a button after the last video that changed the units between meters and centimeters, so I just adapted the code from that!
@patkeller2617 Жыл бұрын
Yes, Mission completed! Key was to refer back to tutorials 27-29 and create a button push loop that only triggered on change of state of the button and then only did the measurement when that change of state was to the closed position.
@Cartoonen2 жыл бұрын
I'm legend. But I did use an OLED (SSD1306, I2C) and the Micro Arduino, so I did not experience any trouble with the digital ports. (no number 13 on Micro). Thank You for your fab lessons. Regards from Denmark.
@RavensHammer0010 ай бұрын
I am Legend. Thanks, Paul! Okay, finished watching, going to go do my homework. This is probably going to hurt. Increasing precision with speed of sound...I think I know where to start.
@paulmcwhorter10 ай бұрын
LEGEND!
@johntello89043 жыл бұрын
I am legend!!! This was tricky to get it to work properly...but I managed to complete the homework beforehand!
@thomasmaxwell43962 жыл бұрын
I am legend :-) I used A2 since it was closer to the button, I hadn't thought of 13 at all - something to think about for the future. As for the homework, you don't differentiate between a hardware or software solution, or whether we can use an avg of 10 reads, or if we need to make it more accurate with a single read. Easiest solution is 10 reads and take the avg of that.
@hughpatterson14803 жыл бұрын
I am legend, except I am exhausted from trying to solve the pin problem. I thought pin 13 might be a problem due to it's connection to the built in LED, but I tried it on the chance that I was wrong. It was an epic fail (one for the history books of nerd lore). I worked through the logic of using an analog pin and success. Thanks again for another fantastic lesson Paul!
@farshidowrang27622 жыл бұрын
Takk!
@paulmcwhorter2 жыл бұрын
Once again, Really appreciate it!
@dalecapling51533 жыл бұрын
I AM LEGEND! I used PIN D3 for the switch input and Pin D2 for Trigger and Pin D4 for Echo. I also used "IF" commands with the same result.
@dougrichardson94692 жыл бұрын
Thank You For Posting These Very Helpful😀 Lessons
@paulmcwhorter2 жыл бұрын
Glad you like them!
@wick62964 жыл бұрын
Hello Mister Paul ! Thank you for all these videos you're making for us, for free ! You have my gratitude, and of course the like button pressed !
@caltech-wirewizard2 жыл бұрын
"I am legend". I had a brain fart on the "pull-up" resistor for some reason. My code was "dead-on ... perfect" right from the get-go. I found the wiring "error of my ways" then "BOOM", worked perfect ! I had Digital Pin2 (D2) available for the "pull-up" side and didn't have to resort to Pin13 or any Analog Pins on my Nano (Which I bought from Paul's provided link).
@hasan-motam2 жыл бұрын
I am legend! Did it on my own after some software troubleshooting.
@paulmcwhorter2 жыл бұрын
LEGEND!
@nicholasesposito12124 жыл бұрын
I was able to do it on my own though i did use some past videos to refresh certain topics . I also saw that the next video was to add a go button so i added that in too . Thanks for the great tutorials!!
@jansimurda99984 жыл бұрын
I did my homework and it didn' t take me a long. But, I've got great teacher. Thank you Paul
@snehashishbanerjee25754 жыл бұрын
Can't appreciate enough... Another excellent project. Your neat and clean building approach turns electronic circuits into like a beautiful Artwork! Hope to see you on lesson no. 61 soon...!!!
@vincecouldrey23703 жыл бұрын
I am legend. Excellent videos Paul. New to Arduino and I have worked through this series of tutorials. learned a great deal. Thank you for your work in creating this videos. From over the pond
@paulmcwhorter3 жыл бұрын
Great to hear!
@purvagn4 жыл бұрын
We are your students and we are legends! :) luckily we are still using Uno so didn't run out of the pins.
@florianverbruggen44344 жыл бұрын
Sir, you are the reason, why i like Arduino. And i'm legend
@destinyokwong209926 күн бұрын
sir, the way you did it has made me to take note of formatting
@paulmcwhorter26 күн бұрын
Glad I could help!
@corneliuschamberlainmarcou6127 Жыл бұрын
Mr.Paul, you are a Legend.✊🙌
@matthewclarke51694 жыл бұрын
I am Lengend, I loved this homework, the maths isn't my strong point, however, the coding and fault finding are loads of fun. even managed to hook the backlight up the the button function.
@johnmorris38984 жыл бұрын
Thanks again Paul for your excellent tutorials. Didn't put the second read button in the while loop so got nothing as you stated. I thought about it and changed it to an if loop but with buttonVal==0 and put the whole measure calculate print delay and clear inside the if loop. It worked so I was feeling smug. I think the while loop is more elegant though, less smug now.
@JimPeugh9 ай бұрын
I am Legend! Got it by referring to my previous completed projects. Adding switch straightforward.
@paulmcwhorter9 ай бұрын
LEGEND!
@ShinesMonkey14 жыл бұрын
I am legend!! (after finally figuring out how to set up the while statement - it finally dawned on me that I did not need to make an additional statement on when buttonVal=0).
@wallaceshackleton18894 жыл бұрын
Mine works in a kind of fashion, the measurement delay is erratic but the principle works so I'm happy.
@MrSt3v3Solo8 ай бұрын
I am legend :D Thanks Paul for your lessons!!!! Using them for Home Education for my 13 year old daughter. Plus I am learning, amazing lessons!
@paulmcwhorter8 ай бұрын
LEGEND!
@varunnova59053 жыл бұрын
I am a legend, I added a reset button too, it clears the screen, was pretty helpful!
@stevenog2 жыл бұрын
Did the homework before watching this lesson. Used D3 for the button.
@michaelcostello69914 жыл бұрын
Really interesting seeing how the while loop stops the program so easily. thanks
@dplighting4 жыл бұрын
D13 seems to work ok with an external resistor, i did wonder why pin 13 would not pull up via code, thanks for the tip!! Another great lesson thanks Paul!!
@ujjawalgupta9221 Жыл бұрын
I am LEGEND!! Thank you sir for all your lectures.
@tanvirahmed85863 жыл бұрын
I completed the homework. I'm a legend.
@paulmcwhorter3 жыл бұрын
LEGEND!
@willemwieriks40533 жыл бұрын
Boom, Homework done and I succeeded. Thanx Paul!
@paulmcwhorter3 жыл бұрын
Great job!
@niteshram1578 Жыл бұрын
Couldn't be able to do by myself.....but u r the "LEGEND..!!!!"
@paulmcwhorter Жыл бұрын
LEGEND!
@petrusjohannesrautenbach3823 жыл бұрын
"I am legend!" but only because of a good teacher!!!!!
@alexm.47202 жыл бұрын
*edit 2 Looks like i already have the assignment done for next Lesson 61 :D . Thanks for this amazing Arduino Series. I have learned so much and i am excited to see what we will be learning next! *edit 2:49 how did you use up all your digital pins with only the LCD and the Ultrasonic sensor if the LCD only uses 6 pins and the Ultrasonic sensor uses 2 pins. Thats 8 pins total..?? I had enough pins left to also connect the DHT11 sensor and TWO buttons and still had pin 13 available. XD I am legend! I even went ahead and added a for loop inside the if statement so when i pressed the button it would make 10 distance readings with a delay of 25ms each and calculate the average distance. With this i am getting more accurate readings.
@matthewcollins1858 Жыл бұрын
Present. I am legend. Didn't have any issues with not enough pins, did have an issue with every time I pressed the button it would turn everything off, figured since electricity flows like water it was shorting itself out. Solved it by placing a resistor between the power supply and the button.
@paulmcwhorter Жыл бұрын
LEGEND!
@muhammaddanial504 жыл бұрын
Boom it worked another super cool lesson
@minhtam50514 жыл бұрын
Hi Paul. I did the homework with 2 buttons.
@kuravani19634 жыл бұрын
Thank a lot Sorry i could not do the homework due to tis lockdown in Maldives ,Still waiting for my Arduino nano and Jumper wire and bread board. but i'm taking your lessons very seriously.
@jasonvictor9542 Жыл бұрын
Thanks Paul, another great lesson, i like this perfecting looks and acts alot better!
@bassome3000ify4 жыл бұрын
Thank u paul for all ur shared experience and knowlesge, not just arduino , but also the other stuff like wind and many others. u helped many to learn a lot :D
@freddyveza Жыл бұрын
I am legend! Using a Uno, a push button, an HC SR-04, an I2C LCD and a potentiometer for screen brightness, all hocked up to a 170 point breadboard with a bunch of jumper cables in between, my build is so ugly, love it
@paulmcwhorter Жыл бұрын
LEGEND!
@Jason-ot6jv4 жыл бұрын
I finally caught up to your most latest video, im so excited for the new one! I am legend!
@josemunoz6294 жыл бұрын
same here!!
@jabber28247 ай бұрын
I AM LEGEND. I didn’t encounter the problem with the pin since I changed the LCD to an I2C controlled OLED which only needs 2pins (A4 and A5). But, I suddenly had issues running on the usb port where the void loop () would only run once and the arduino nano would then stop. Looks like it’s related to a bad cable or connector. Running from a 9v battery and the power regulator is fine.
@pudgepatenaude34813 жыл бұрын
Homework done, I am legend in my own mind.
@paulmcwhorter3 жыл бұрын
If you are on lesson 60, you are LEGEND indeed!
@MSMEHYDRO4 жыл бұрын
Good stuff Paul. Hope all is well!
@tntragan2 жыл бұрын
I did the homework again with success, however, I did not have a prompt asking for user action. I just did mine with an if loop and a delay. It worked well. Since I haven't purchased the nano yet, I had plenty of space on my arduino. No wires were covering my open pins of 4, 5, and 6 and I plugged in there for my pullup resistor button. I'm curious why you don't use the INPUT_PULLUP command in the setup instead of the two lines you use. Maybe your trying to get people to see what they are doing by using both commands? I am still following your channel every day. I try to get at least a couple lessons in every evening. Thank you for all the work you are putting into these vids. They are helping me immensely and I really appreciate it.
@loat55054 жыл бұрын
Great work Paul, I would have no idea what to do if it wasn’t for u ❤️
@GabesvanBlerk7 ай бұрын
I am legend . Tanks Paul love your vidoes!
@SC-ys5re2 жыл бұрын
I am legend😄. Thank you for this amazing tutorial🤗🤗
@roxleyldc3 жыл бұрын
Paul and anyone else, I found the problem! The board selection was on the wrong device. Thank you, all set.
@caripatd2324414 жыл бұрын
I' M A L E G E N D. Thanks Professor McWhoter. Really good lesson. I figure out the pin 13 problem. Was a good challange
@mun56603 жыл бұрын
I was able to do it...it was pretty easy tbh. Thank you sir!
@paulmcwhorter3 жыл бұрын
Excellent!
@killianbuenst91544 жыл бұрын
Please, be my personal hero and make a html serie of tutorials
@thusharabro93494 жыл бұрын
AWESOME TUTORIAL please do a midi drum kit tutorial that can work with PC software. like FL Studio.... you are the best electronic teacher that I've ever seen ALL THE BEST!!!!!!!
@paulrockwell99143 жыл бұрын
Got it working as homework! My LCD display text wasn't as elegant as yours though. Also did a little C++ extra-curricular learning to abstract a button into its own object class (and have it work the same regardless of whether I use a pull-up or pull-down resistor);
@A.Qalawi22 күн бұрын
great lesson! for the next hw i would make it fire 5 times, and then print the avr of the 5 times ... could work..
@Vbeck563 жыл бұрын
I had the Pin13 issues, but the way I solved it was by using a OLED screen with an I2C four wire connection... took a but of tweaking to work out the code. also I used an If statement....it did work as well as yours but after seeing you use a while loop i changed it and it works much better. I am currently working on scrolling text. I don't want to copy and paste, I'm trying to figure what commands control it so i can fully understand the coding and properties.