Тёмный

Arduino Tutorial 26: More Fun with Photo Resistors 

Paul McWhorter
Подписаться 378 тыс.
Просмотров 114 тыс.
50% 1

You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
/ paulmcwhorter
In this lesson we do a project based on a photoresistor. We control the tone of a passive buzzer based on the brightness of the the light in the room.
You can get the kit I am using for this series at the following link:
amzn.to/2I7N4Ek
Also, you can get the Mastech Digital Voltmeter I am using here:
amzn.to/2Ks9nHN
You can follow these lessons at our WEB site HERE:
toptechboy.com/arduino-tutori...
[Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. This means if you visit the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.]
#Arduino

Наука

Опубликовано:

 

2 сен 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 792   
@olegvelichko1659
@olegvelichko1659 4 года назад
Oh, and I’ve watched an insane amount of Arduino tutorials all over RU-vid, read a couple books and many an article. Short of taking personal classes this is THE BEST series of tutorials I’ve found yet. The sheer detail and the LOGIC of HOW and WHY you’re coding this way is amazing. Paul - a heartfelt THANK YOU for making this content and making it available for FREE. You, sir, are awesome.
@snehashishbanerjee2575
@snehashishbanerjee2575 4 года назад
U r absolutely correct
@louandpaulanickles7172
@louandpaulanickles7172 4 года назад
Of course we can always show appreciation at his Patreon page www.patreon.com/PaulMcWhorter 8=)
@DeeGeeDeFi
@DeeGeeDeFi 3 года назад
Yep. Enjoyable, compelling videos providing an excellent basis for electronics and programming. Dr. Peter Dalmaris has some very good, thorough yet almost a little too academic Arduino series on Udemy, but I look forward to watching and learning with Paul. I'm probably going to get a Raspberry Pi or Jetson Nano so I can continue learning with him. Support him on his Patreon page!
@mathewsjoby6455
@mathewsjoby6455 3 года назад
yep you are RIGHT!!
@DownRemedyLane
@DownRemedyLane 3 года назад
Completely agree!
@taurruth
@taurruth 2 года назад
I always do your assignments alone before you do it. And I love how you explain how things actually work instead just saying "type this or that". Actually knowing how components work makes it easier for me to understand what I have to code to get desired effect. This is the best series of tutorials on Arduino on YT.
@iplayflute
@iplayflute 2 года назад
This is my favorite lesson so far. I changed the buzzing delays to microseconds to create notes and moving my hand away and towards the photo resistor changes the pitch. I'm a classical musician so I spent like 30 minutes just playing pieces, scales on the "wireless" instrument. lol
@anantchandak9574
@anantchandak9574 2 года назад
hey same with me i also just do the same. as i am also a musician
@ryanturnbull1532
@ryanturnbull1532 4 года назад
I was so happy when you fixed this.......i was shouting at the screen😂🤣😁 ........im learning thank you paul your a legend
@fetchfooldin3252
@fetchfooldin3252 3 года назад
You can't imagine how much I screamed at the screen 🤣🤣🤣🤣🤣
@believer3759
@believer3759 2 года назад
I am still screaming because Paul used A0 in his pinMode instead of the variable name! LOL So awesome!! Thanks Paul!! :D
@Nivek389
@Nivek389 5 месяцев назад
I was screaming Paul on that not being an INPUT. But i was 4 years to late haha. You've taught me so much already. Thank you!!!
@Bob-zg2zf
@Bob-zg2zf 4 года назад
We audiences could become smarter and smarter just by listening to Paul's logic. It's so inspiring and logical. He explains everything so clearly and is beginner-friendly. Even if you're not following his experiments, you can improve your IQ by just listening to him. I mean it!
@ysnjgl4335
@ysnjgl4335 2 года назад
It is soo Canadian from you
@varunnova5905
@varunnova5905 3 года назад
I am still learning Arduino, and I am sure will learn it all, till the end of the series!
@LeKaixen
@LeKaixen 2 месяца назад
Genuinely one of the best professors i've ever had thanks paul for all that you do. I will be taking more classes from your youtube channel in the future thank you
@opalprestonshirley1700
@opalprestonshirley1700 4 года назад
I was laughing my head off, I've made that mistake more times than I can count. A fun project love these. Thanks Paul.
@timothyflanagan7775
@timothyflanagan7775 2 года назад
ABSOLUTE BEGINNER...... It took me a little bit of time; but I'm getting it..... thanks 😊
@mylittlepony9557
@mylittlepony9557 6 месяцев назад
I make it before watch your solution. I used microsecond delay instead of the milliseconds, and it produced more dramatic tones. I made the room dim , turned on my iphone's flash light, and moved the flash light closer or further from the photo resister. My analog read voltage is based on the voltage of the regular resister, not the photo resister. I did brighter with lower tone and darker with higher tone first. Then did another calculation to reverse the relationship between the light and. tone: brighter with high tone and darker with low tone. It is fun! Thank you, Paul!
@Pietromagg
@Pietromagg 3 года назад
Who in their right mind is downvoting you? Because of you, I am learning such incredible information!
@iterance_
@iterance_ 3 года назад
Many thanks for making this series of tutorials available online! Such a valuable resource. I find it particularly interesting to hear you go into detail into the how and why. I started this series a week ago, and I certainly plan on seeing it through to the end. Cheers Paul for the quality content!
@dougrowell7817
@dougrowell7817 3 года назад
And I love your "let me make myself smaller" and other layouts. Very professional.
@impulse9552
@impulse9552 3 дня назад
haha no way, i already did this project out of curiousity after watching the last lesson. Thank you so much for your videos, you make it very easy for us to learn and then use these components on our own, and whats crazy is that theres almost no other arduino tutorial series that exist out there that could match up to this. Love from Kenya ❤
@paulmcwhorter
@paulmcwhorter 3 дня назад
Thanks for the kind words! I love Kenya, and especially like Kitale. I have traveled all over Kenya.
@impulse9552
@impulse9552 2 дня назад
@@paulmcwhorter That is super awesome, Kitale is indeed a great place!!
@adrianmadigan7298
@adrianmadigan7298 4 года назад
Hey Paul,i got it working slightly different but got the same end result. BOOMMM!!! Loving the videos, keep up the good work. Here's my sketch int lightVal; int toneVal; int buzzPin=8; int lightPin=A0; void setup() { pinMode(lightPin,INPUT); Serial.begin(9600); pinMode(buzzPin,OUTPUT); } void loop() { lightVal=analogRead(lightPin); toneVal=(9940./850.)*lightVal+60; Serial.println(lightVal); digitalWrite(buzzPin,HIGH); delayMicroseconds(toneVal); digitalWrite(buzzPin,LOW); delayMicroseconds(toneVal);
@anthonyearnst9376
@anthonyearnst9376 3 года назад
I was put in quarantine at home due to a family member. I ordered the kit from your link and it arrived fast. I've been following along and learned so much! It's the best boredom killer I could have asked for. Also, when this is all over I'll know how to program arduino! LOVE IT. Thank you Mr. McWhorter!
@lancebowersjr.8897
@lancebowersjr.8897 9 месяцев назад
I did it by myself and it was so cool afterwards. I feel like I made my own Theremin. Keep the videos coming and I will keep watching and more importantly learning.
@kalensouza8742
@kalensouza8742 2 года назад
I'm a small town farmboy that likes building things. This series is exactly what I was looking for. I like that you go into the why's and how's I've made it this far planning to continue building along.
@matthewmalloy354
@matthewmalloy354 4 года назад
Loving the redo on this series. Thank you for all your hard work.
@KakdeG
@KakdeG Год назад
Exceptional. The passion to teach and your style got me out of my couch and start working with Audrino. Working with electronics after a couple of decades now. Loving it.
@martijnves
@martijnves 4 месяца назад
I made it work by myself 🙂 There are so many interesting video series about Arduino, I keep coming back to channels like this one because I actually learn new things. Paul you really explain what is going on in the circuit and components. I am happy you speed up a bit since video 20,.I really like this video series. Big thanks!
@Decoy22x
@Decoy22x 4 года назад
I'm literally yelling at you for typing OUTPUT Instead INPUT.
@turatsell
@turatsell 3 года назад
I was also yelling, but retrospectively from year 2021 :) Paul is a good actor too :)
@AndrewLanier.
@AndrewLanier. 3 года назад
SAME but retrospectively 2 weeks after @@turatsell
@kartikpaliwal9654
@kartikpaliwal9654 3 года назад
@@turatsell bruh lmao .but yeah i was yelling at him in my mid
@markuschampos5750
@markuschampos5750 3 года назад
Should it not also say: pinMode (lightPin, INPUT); instead of what he wrote: pinMode (A0, INPUT); ?? It obviously worked anyway... int lightPin=A0;
@6183134
@6183134 3 года назад
I think there is no better tutorial that made by Paul. All of his tutorials are excelent.
@alaninkarachi
@alaninkarachi 2 года назад
Paul, Excellent again. I keep looking at the next few lesson with great anticipation. Got lots of projects in mind and I can see as we move forward you are covering all these basics for me. Brilliant.
@paulmcwhorter
@paulmcwhorter 2 года назад
Excellent!
@brightenpeer1356
@brightenpeer1356 5 месяцев назад
I worked it out for myself, based on what you had already taught me. I used an LED torch and my finger to get a range of 65 to 9500 microseconds. I simplified the equation on paper, before coding, to make the program easier to read. I checked a number of points to prove slope was valid. Neat lesson. Thank you from South Wales in the jolly old UK.
@EdwardRLyons
@EdwardRLyons 3 года назад
This is a great example of the software doing exactly what you tell it! It might not be what you *expect*! A great lesson in how we can be blind to our own errors, and how we need to be methodical in working through the issue until we find the problem(s). Thank you, Paul, for not editing out this fine example!
@benjaminjvredevelt
@benjaminjvredevelt 3 года назад
Your videos are awesome Paul! Thank you for your constant positive attitude and repetitive nature! You are a great influence on everyone who tunes in.
@lokolobos12
@lokolobos12 4 года назад
I am very new to programming. I was able to get this to work on my first try but I used if statements but once you went over it, your code is much more simpler. I just want to say how grateful I am for your tutorials. Thank you so much, Mr. McWhorter.
@user-ye6ke6pt8m
@user-ye6ke6pt8m Год назад
Mr. McWhorter, I've had three or four Arduino kits. I have given them all away. Due to the lack of learning I have burdened myself with. YOU my friend are by far the best teacher I've found. You have explained why the Arduino is functional. Better yet you explain the components of the kit and why they do what they do. Your attention to an all around lesson with the math and physics behind what we are doing is just what I've been looking for. I am going to keep my new Arduino, follow your lessons and actually learn. THANK YOU BROTHER!
@Rccrasher716
@Rccrasher716 4 года назад
Love that you show how trouble shooting really works. Another great video. Thanks!
@timjpyne
@timjpyne 3 года назад
Paul. I have done it. I did not think I could master the Arduino, until I came across you on RU-vid. I am amazed how much you have taught me. As others have said, having watched a lot of Arduino tutorials, and have not learnt much. But yours are different I am learning lots. Thank you.
@michaelw24401
@michaelw24401 3 года назад
Exactly 1 year after you posted this to RU-vid I was indeed yelling "It's the lightPin mode!" Glad you found it. Simple oversights like that can be some of the most frustrating to troubleshoot and when you find it you're like "DOH". I completed the assignment and then checked my work against yours. Pretty similar. Thanks again for these tutorials.
@doughibberd1576
@doughibberd1576 Год назад
Paul, good lesson, I was yelling at the tablet as soon as you put A0 as an OUTPUT, great to see you leave your mistakes as it is a great learning experience for everyone. The person that doesn't make a mistake does nothing.
@michaelobrien3365
@michaelobrien3365 Год назад
Actually it should have been lightPin and not A0 so two mistakes. pinMode(lightPin, INPUT);
@thetreeoffacts6020
@thetreeoffacts6020 21 день назад
Thanks sir, it worked. At first, I did it in a different way without doing math using this code: int lightPin=A0; int lightVal; int buzzPin=6; int buzzVal; int dt=250; void setup() { Serial.begin(9600); pinMode(lightPin,INPUT); pinMode(buzzPin,OUTPUT); } void loop() { lightVal=analogRead(lightPin); Serial.println(lightVal); delay(dt); lightVal=map(lightVal,0,1023,0,255); analogWrite(buzzPin,lightVal); } and it was working the same way ,and also louder than the one in the video, but I don't know the reason.
@russellmaguire4316
@russellmaguire4316 4 года назад
I combined the buzzer tone and LED indicators in one program Code. Super happy.
@dj_jamfu91
@dj_jamfu91 4 года назад
I did the same also
@Jim-mn7yq
@Jim-mn7yq 4 года назад
I did the project assignment and then looked at Pauls approach. I went from a very low sound in dark to a very high sound depending on the light. And I did the math and worked with a negative slope. All in all, a very good lesson, showing how important it is to persist in finding a solution.
@jeantorres3293
@jeantorres3293 3 года назад
I did it by myself very fluently, you're an excellent teacher! Just flying through these
@richardwells2687
@richardwells2687 3 года назад
Hey Paul, I hated linear equations at school, and dreaded doing it in the previous lesson. This time its making sense. I wish I had you as a math teacher, oh and your lessons are fantastic. I now find myself looking forward to the homework. younger me would be shocked. thank you.
@nameesnaleem9851
@nameesnaleem9851 9 месяцев назад
I saw your A0 pin mistake from the beginning and I yelled, but you didn't listen at me.. Thank you for the lesson Paul. It means a lot for me..
@nolanhanson971
@nolanhanson971 2 года назад
Hi Paul, this series is fantastic. I was able to get a working sketch/circuit on my first attempt but only because I had a good teacher. I will never forget to check for proper input/output when I'm debugging.
@kingkikapu22
@kingkikapu22 3 года назад
Paul McWhorter is my favorite person that I don't personally know.
@jackflight2756
@jackflight2756 3 года назад
Wow, such a great tutorial. Did the math right but meshed up the variables. But making progress with understanding the formules and the math. Love the way you do the debugging! And it is so helpfull to see that anyone can make mistakes and then solve them!! You are a fantastic teacher!!!! Greetings from an old student(65 years old) from the Netherlands and many thanks for all the free lessons…..
@surfaceten510n
@surfaceten510n 4 года назад
Great lesson keep them coming i'm learning so much more about coding and improving my maths at the same time thanks Paul.
@justme_chilling3160
@justme_chilling3160 11 месяцев назад
I feel so lucky to find this channel. I always wanted someone to explain how thing work rather than what to do. Thanks you alot!
@doverivermedia3937
@doverivermedia3937 Год назад
The debugging methodology is a GREAT lesson as is your more in depth theory and maths. PLEASE do keep that stuff in. By far THE best learning resource on you tube for Arduino. Keep it up ! ... and if you really want to 'shout out' to us brits ? Call it "mathS" not math ! 🇬🇧
@madalinduna4160
@madalinduna4160 4 года назад
I did it by my self and it worked. Math is really good and useful. It's transforming persons into engineers :)
@davidkeynton3402
@davidkeynton3402 3 года назад
Excellent tutorial, I worked out the math and code by myself first and got the circuit working before watching you do it. Really appreciate the fact you go into the physics and math behind the projects, that's how we learn not just blindly copy. Am really enjoying the "homework", hope all the upcoming lessons have this as well. Hands down the best Arduino tutorial series on the internet. Thank you.
@paulmcwhorter
@paulmcwhorter 3 года назад
Fantastic!
@Sheredo
@Sheredo 7 месяцев назад
I know this series of videos has been completed quite long ago at this point, but I just want to thank you SO MUCH for explaining the math behind what you were doing. I love excercises where I have to think on how to do stuff, and the best thing is that with the method you thaught us, if I want to use another type of input or output I can make everything work because I understood the logic behind it. Thanks to your previous lessons I could do the assignment on my own withot a sweat, and it was very satisfing to see that I did everything correctly!
@glennfelpel9785
@glennfelpel9785 4 года назад
You will need to send me a gold star. But I had more of a challenge to get it working than you did. Love the tutorials. Thanks for all the effort.
@MisnomeredHandle
@MisnomeredHandle 3 года назад
Thanks for these videos, Paul! I found somebody else's research on NIH to find that a sample of 205 people tended to prefer a frequency centered on 399 Hz with a 350Hz bandwidth and adjusted minimum and maximum timings based off the highest and lowest frequencies, respectively. I figured a lower frequency would be more pleasant for having a brighter room, and was able to map it. :) I'm finding a lot of sense of accomplishment with each of your pop quizzes, exercises, etc, since I wasn't interested in programming until I begin looking at hardware-software interactions. Also, I am a BIG fan of how you go through device/semiconductor physics since I have taken a few courses on these courses in the past few years. Please keep 'em coming if you are still adding videos to this playlist! I look forward to the rest of this series.
@mattnelson4139
@mattnelson4139 4 года назад
Used the concepts for the LDR with a TCRT5000 infrared module. Got an LED to change brightness when an object is detected. Also can get a buzzer to change it's frequency. Thanks for making this stuff easy to learn! By far, my favorite series of Arduino tutorials.
@starRunnerX
@starRunnerX 4 года назад
I made it work. I really appreciate that you encourage us to figure out `C` on our own. I've learned so much so far. Thank you so much for these videos!!!
@James68257
@James68257 2 года назад
What I love about programming is when you build a circuit and it works perfectly (with or without debugging) you get a feeling like no other! Thanks for making this series, it is really helpful and I hope to truly understand Arduino by the end of the series.
@paulmcwhorter
@paulmcwhorter 2 года назад
Yes, it is like a good healthy natural high you get from undertaking a hard challenge and then succeeding. We need to get young people to find that thrill and they would no longer be chasing drugs and alcohal
@samilnaml7636
@samilnaml7636 4 года назад
Woow.. I’ve just done it properly and now I am rejoicing watching this exciting video!
@misterdecaro
@misterdecaro 2 года назад
Finally got it! I love the graphing. I did try to do it on my own - the math and graph but I had it wrong and had to watch the video a few more times...but I got it! My graph points were buzzerDelay, readVal: 1ms,160 and 10ms,960. This produced a low tone when resistance was low (lights on) and high tone when the lights were off. To verify my understanding, I switched slope of my line using points 1ms,960 and 10ms,160. Then I used the absolute value function on the calculated buzzer delay to get positive buzzerDelay values only. Lights on: high tone, lights off: low tone. This is so cool!!! Thanks Man!
@JustJimWillDo
@JustJimWillDo 2 года назад
Enjoying this series from the plague-ridden future! After I got my homework assignment working I was sitting here alternating between laughing like a loon and yelling "Input! Input!" like the robot Number Five from the movie Short Circuit! Excellent work, love your all-inclusive approach.
@buniyaminadewusi8593
@buniyaminadewusi8593 Год назад
There was a mistake on the setup for the pinMode for the photoresistor, it is suppose to take the variable name not the name of the pin, I really appreciate these series, it my ticket to robotics engineering.
@fswarrior9510
@fswarrior9510 3 года назад
I did your assignment succesfully, your videos are getting more and more educational, thank you sir
@rhandynastor4866
@rhandynastor4866 Год назад
thank you for this tutorial. I did it myself but in different way. Been studying this coding in these series. I started from scratch and it helps me a lot doing this alone.
@pd8559
@pd8559 3 года назад
Most excellent teacher and series. For those wanting to know the math to Google to learn more about what Paul is using try these two in searches Point-Slope Equation of a Line The Slope Formula I have only a few OCD triggered comments delayT was defined as int but used as a float Looking up the arduino delay() function it takes an unsigned long as it's parameter that you need to pass to it so any of the integer values will work but sending in a float value would be meaningless to delay() so doing floating point math which is more costly to perform than integer math is not needed with arduino in this example. Paul is building these lessons on the fly in front of the camera so I'm not critical to Paul just passing on some things I learned after reading and researching after watching this video that inspired me. For anyone wanting to get more advanced, and I do hope Paul mentions this later in this awesome series but it is inefficient to continue to calculate again and again the same equations in a loop on a low powered microcontroller. For example m is constantly recalculated each time the loop executes. Instead define a variable m and calculate the value of m one time only above the loop() section. Then in the loop section use m which is now already pre-calculated saving compute cycles. Hence the line delayT=(9. /550.)*lightVal... Becomes delayT=m*lighVal... If you notice on the same line delayT= you have the remaining... LightVal-(9.*200./550.)+1 and this too is inefficient use of compute cycles repeating the calculation every loop--move this to another variable calculated once above the loop let's call that k for example. Now inside the loop your delayT line is now simply: delayT=m*lightVal-k; // a single multiplication and a single subtracting each loop And your microcontroller is speeding through this calculation much faster because the first and last parts have already reduced to answers needed to finish the multiplication and subtraction in this line of code. . One small catch in the pinMode() A0 the literal pin was used instead of the variable. As Paul mentioned many times earlier use the variable in case you switch physical pin used in the future. Again this is more advanced way of thinking and designing code for microcontrollers and beginners should ignore unless this makes sense to you reading this or you also get OCD over these things like me (smile). Paul if you are reading I love when you deep dive into why things work the way they do. I hope you do it more often.
@xxiji5075
@xxiji5075 3 года назад
Paul:"there's math in this video" me grabbing a bucket full of strong Italian coffee, raising two thumbs up in the air! thanx for the great videos!
@arnaudmasse7839
@arnaudmasse7839 3 года назад
Managed to do the whole program and make it work on my own ! amazing tutorials, by far the best on youtube!
@paulmcwhorter
@paulmcwhorter 3 года назад
Nice work!
@EthanElkorr
@EthanElkorr Год назад
I attempted to do it. I got most of the math and code but ended up needing a little help. I love your lessons Paul McWhorter. I learn so much and I'm working my way through them all.
@badgerworx
@badgerworx 2 года назад
I found this series and have fully gone down the rabbit hole watching. I have been looking for a great introductory series to the Arduino for my 14 year old and This is the one. Thanks for providing such a great series.
@paulmcwhorter
@paulmcwhorter 2 года назад
Excellent. At 14 he should be ready for this material, maybe with a little help from you. The math in these lessons should reinforce what he is learning in school, and show practical applcations of the math.
@grathado28
@grathado28 2 года назад
I think one of the biggest rewards of this series is as you're giving the assignment my brain will automatically pop up what I need to do and then with your timing right afterwards you say it dand confirms for instance lightning converted into a sound immediately formula came up LOL
@paulmcwhorter
@paulmcwhorter 2 года назад
Making something work is genuinely one of the small pleasures in life that lead to happiness and a rich life. An LED blinking as you intended gives a high that no drug or intoxicant can. Be blessed.
@ericsmith7988
@ericsmith7988 4 года назад
I did it on my own had to think about it for a bit but it works really good. Thank you Paul for the lesson.
@zachhamersley967
@zachhamersley967 3 года назад
Math it Up! I solved it using 0-1023 as my x1 and x2 values and the tone values we found in lesson 24 as my y values. Worked great. Then I re-did it doing it your way, that really helped me get a grip on the math. Love to watch peoples troubleshooting process. "Comment out" was a great bonus lesson in how to troubleshoot code. Paul you are a king among men!
@paulmcwhorter
@paulmcwhorter 3 года назад
Excellent!
@danielhastings1705
@danielhastings1705 2 года назад
i love how you teach about all aspects, maths, phsyics, coding ect. amazing!!!
@briankelly4095
@briankelly4095 Год назад
Hi Paul. I began to watch these tutorials a few years back when I got my first Arduino but dropped away once I began to feel self sufficient. I've watched & enjoyed many of your other series (currently watching Pico W). It occurred to me that it would be in my best interest to watch everything you've produced. I even went back & watched your original Arduino lessons. Now I'm working my way through these. You always manage to teach me something. Thank you. I will say that I had better luck with the buzzer assignment in this tutorial using the tone() statement rather than the digitalWrite() / delay() strategy. I would hope you don't have too many 'haters' these days. After all this time, people must 'get' you. Ignore them if they show up! People need to understand why things work.
@garyhart6028
@garyhart6028 2 года назад
Hi Paul, WoW that maths is getting complicated for me. I had trouble with my circuit to, mine was caused by my buzzer not seated properly in the bread board. I'm so glad you go through it all not only the maths but your trouble shooting as well, a lot of people would pause the video at that time. It gives me a real insight of different things to try, and the real lesson, Don't Give Up. God bless you my friend
@leobasil5658
@leobasil5658 3 года назад
excellent series of tutorials!! And the mistakes are the best part of learning! People who never make a mistake never learn anything! And the theory is absolutely important...any one moaning that it's boring is on a hiding to nothing to terms of improving their enjoyment of programming and electronics...I've been programming since the early 80s and tinkering with electronics for decades...and am enjoying this series as a kind of fun revision course and, above that, is just really interesting to listen to! Many thanks!!!
@erwinvelasquez9018
@erwinvelasquez9018 3 года назад
I made it work by myself. Laid out the min and max for both toneVal (for the delayMicroseconds) and readVal, defined the pair of points and drew the line in the cartesian plane in quadrant 1 (but the line I drew was from top left to lower right, like a backslash character - high light for low toneVal (hi-pitch), low light for high toneVal (lo-pitch)), used slope formula and point-slope (learned from previous lessons), hooked up the circuits, wrote the program, worked! When light is down, pitch is low; when light is up, pitch is high (using mobile device flash light). Thank you!
@fabrom7792
@fabrom7792 4 года назад
Yess !!! I did it ! That's great. Thanks Paul, because your lessons are so good, everything is easy now ! Fab from France (and moreover I improve my english !! ;-) Happy new year
@pizzaplays7887
@pizzaplays7887 4 года назад
had fun doing the work and great video as usual. And i did it on my own
@user-cy3je1xd1c
@user-cy3je1xd1c 4 года назад
Yes, I have done it myself! Not from the first time, but after some experiments(i had my head in the sky, and just tried adding different values to my line function), i made it! And i am happy with that! And i haven't noticed your error with semicolon, but with i have noticed with pinMode. Thanks for your great lessons with awesome and deep explanation and the cool way of leading the lesson!
@vedanshbansal898
@vedanshbansal898 3 года назад
Sir you are an absolute legend. Just cant tell you how badly I wanted to learn Arduino and you made it possible. Thanks for your insane efforts.
@paulmcwhorter
@paulmcwhorter 3 года назад
Glad I could help!
@TurnedAfi
@TurnedAfi 3 года назад
Hello Paul, I want to thank you for the effort in these videos, this Lessons are much helpful than my actual professor from my university! Do not listen to the thumb-down guys! Your videos are the best of the best in Arduino!
@toolooselowtrek7523
@toolooselowtrek7523 Год назад
I know I am late to this party but the positive reviews you have received are exactly my sentiments. You are a teacher to the core.
@Isaac_blingz
@Isaac_blingz 3 года назад
great teacher, i had no problem doing this project cos i applied the knowledge from previous lessons
@paulmcwhorter
@paulmcwhorter 3 года назад
Great job!
@RiteshYadav-rc1np
@RiteshYadav-rc1np 4 года назад
paul no words for you are just amazzzzzzzzzzzzzzzzzzing. best tutorial on youtube and it is even far better than any paid courses
@chocolatebunny333
@chocolatebunny333 Год назад
Thanks for all the work you put into these videos, even the math :)
@erygion
@erygion 4 года назад
Thank you Mr. Mcwhorter. I tried to do it myself and I couldn't get it to work but I also added a oled screen, after watching you I got the same result and as soon as I took the screen out it worked great, I would have to change the math to compensate for the added code. Great lesson I learned a bunch. 😅
@ricardocarmona2196
@ricardocarmona2196 3 года назад
I tried it out on my own and thought I had created the code successfully, however after I continued to watch the video I realized I had done the math wrong, I didn't know I could have a starting point of more then 1 for the photoresistor because we never had anything similar with the potentiometers so I ended up messing up most of the math around the end when we subtracted by the slope of the line. However I have learned so much over the course of these videos and I really appreciate Mr.Mcwhorter putting out educational videos like these. I learned all these formulas but it seems I still need more practice using them with arduino! Thank you again Mr.Mcwhorter for allowing a lot of people learn the skills you have mastered (or so it seems)!
@rishabmudliar1058
@rishabmudliar1058 4 года назад
I did it myself and I like to do math and it feels good that I can apply these concepts here!!!
@maxmelit
@maxmelit 4 года назад
Finished it on my own with my own math but working fine, thank You for your wise way to teach.
@syedibraheemzeeshan806
@syedibraheemzeeshan806 9 месяцев назад
Hello Mr Paul, great work I just made your project myself but I was stuck because I was wrong at math calculation so saw your video everything else was the same the thing is that our school is not yet at linear equations so I guess that's the flaw anyways Thanks a lot your videos are still working in 2023!
@divyanshtripathi4867
@divyanshtripathi4867 2 года назад
Sir you are truly amazing. It is clear that you put all these efforts in the tutorials for us and to hear that some people dislike your videos becoz you don't spoonfeed the codes and logic is utterly disheartening. But rest assured most of us are not like that, we appreciate your hardwork and sincerity and love each second of these tutorials! You are a great teacher Paul and we love you ❤
@paulmcwhorter
@paulmcwhorter 2 года назад
So nice of you
@bill6590
@bill6590 3 года назад
Paul, you are doing an excellent job with these tutorials. Thank you for doing them. As, an old engineer myself I can point out a few things to make them better. There are always several math approaches to solving a problem. You linear math approach is one of them. But, it is very complicated and difficult to understand for most of the people watching. I would suggest instead of using linear math, i.e., xyz and slopes to solve these problems. A different approach, and simpler to understand; is to use relationship math instead. Where equations are written like for like. Example: 1/1023 = 1/255 unknowns can be substituted and easily solved for. In this case 750/10=200/1 and simple relationships can be calculated. There is not enough room here to fully explain that approach. But, you certainly are in command of that type math logic. I have found teaching relationships, even to college engineering graduate students, is much easier for them to understand. Than, what may appear to them to be abstract linear math concepts. Even though, that approach is accurate. So, is relationship math. Just a suggestion for future tutorials. Please keep up the great work.
@angusclarke8592
@angusclarke8592 2 года назад
Great Suggestion! I always had problems with Algebraic calculations, as I could not see how they linked back to the problem, as the letters did not correlate with the missing numbers. Substitution always confused me. Maths was always a challenge to me as I did not have a good foundational basis to build when starting & was very slow in picking up the principles & seeing how they actually fitted in. Just a question for anybody in this network: The subject is *MathermaticS*. Why do Americans use a singular descriptor of MATH for it?
@getabegaz
@getabegaz 2 года назад
I was doing all the homework you gave us. But, today I haven't done this assignment. I'm learning a lot, Paul and thank you for making these videos.
@paulmcwhorter
@paulmcwhorter 2 года назад
Excellent!
@garywilliams5962
@garywilliams5962 3 года назад
I enjoy the math & physics behind the various components, it’s definitely important to understand at a base level how things function. Without that how would you figure out the correct components for a project? Keep up the great work, love these tutorials!
@saeidr.hirbodi9927
@saeidr.hirbodi9927 4 года назад
Thanks Paul, I love your teaching style, at first I tried to memorize, but you repeating everything so patiently, has got me to the point I am starting to understand, the math is an issue still and I am a CPA!! Not good with engineering math though :))
@autocrosser10
@autocrosser10 6 месяцев назад
I made my own circuit and code before I watched your video. I came out with a negative slope so that the tone was low when the lights were dim and the tone was high when the lights were bright. However you had a positive slope but we both had the same end result. X1,Y1: 0(lightVal),10,000(delaytime) X2,Y2: 1,000(lightVal), 50(delaytime) slope of those 2 points are -9000/1000 I might need to watch your answer a little closer to figure out what the difference is. However, after 26 lessons I'm still here and you got a new Patreon subscriber. Your you very easy teacher to learn from. Thank you.
@SkepticDanielAReed
@SkepticDanielAReed 4 года назад
I, too, had an issue that needed debugging...my old eyes got my slots mixed up, and as a result, I wasn't getting a good read on my photo resistor. It's amazing what wiring it up correctly will do to make it work.... I also had to play with the values in the equations to get a better range for my setting. But...it all worked out in the end. Thanks again for the lesson. On to the next!
@agustinruiz2081
@agustinruiz2081 2 года назад
I did it before I watch the video, however, I made a few mistakes before to get it. I am happy you challenged me before to do the project because I could learnt from my own mistakes. Thank you!!!
@carlitodidthat
@carlitodidthat 2 года назад
ty so much for everything especially for motivating me to critically think on my own i appreciate you i will watch ur ads without skipping
@joshuastephen6744
@joshuastephen6744 3 года назад
I'm particularly proud of this program. It was much shorter than what I expected, and what you ended up doing. Surprisingly I was also able to adjust it quite easily. If I can post it somewhere here I will. I may just post the code if nothing else lol.
@lukeyeager2022
@lukeyeager2022 3 года назад
I love the individual projects, it allows me to do actual problem solving stuff instead of being a copy/paste robot.
@jirivanoverstraeten9498
@jirivanoverstraeten9498 2 года назад
Hi Paul, first of all I want to thank you for these great tutorials. I recently started with Arduino, because my son will be starting with Arduino projects in his computer science class. Now we can work together on some of these projects. Incorporating math in your tutorials is a great way to make people understand how these sensors and circuits interact... For the homework assignment of tutorial 26, I did the math...A little bit later I was reading through an Arduino manual and stumbled upon the "map" function, which automatically converts lightVal to toneVal in this case. I will stay an avid supporter of doing the math, but sometimes for quick projects this function can prove usefull. I have added my code for tutorial 26 below. Keep up the good work and greetings from Belgium!!! int lightPin=A0; int buzzPin=8; int lightVal; int toneVal; void setup() { pinMode(lightPin,INPUT); pinMode(buzzPin,OUTPUT); Serial.begin(9600); } void loop() { lightVal = analogRead(lightPin); toneVal = map(lightVal , 400 , 900 , 4000 , 1000); digitalWrite(buzzPin,HIGH); delayMicroseconds(toneVal); digitalWrite(buzzPin,LOW); delayMicroseconds(toneVal); Serial.println(lightVal);
@Williamz345
@Williamz345 Год назад
I did the homework by myself. Thanks for another great lesson!
Далее
Новые iPhone 16 и 16 Pro Max
00:42
Просмотров 1,2 млн
#1099 How I learned electronics
19:55
Просмотров 1,2 млн
Hacking a weird TV censoring device
20:59
Просмотров 3 млн
10 Incredible Arduino projects of the year 2022!
8:15
Просмотров 685 тыс.
Let's build a voltage multiplier!
16:32
Просмотров 2 млн
Everything Starts with a Note-taking System
21:23
Просмотров 204 тыс.
Новодельный ноутбук Pocket386
1:16:17
АЙФОН Г0ВН0
0:54
Просмотров 1,3 млн