1:11 It's actually silicone dielectric potting and not black tape on the bottom of the active buzzer. Only pointing this out in case someone wants to know this; I'm not just being a pedantic jerk for the sake of it. Loving the series so far, I've learned so much.
@borymcpherson97594 жыл бұрын
Boy I had a hard time with this session! I am 71 years old and about half deaf and I could just barely hear any of the tones from the passive buzzer. I just kinda had to take your word for this one. Hope I can do better on the next lesson. I am really enjoying have somethinge to do while being shut-up in my house, due to this virus. Thanks for your time and effort!
@BRP424 жыл бұрын
The pickup on the microphone wasn’t great.
@arlo40514 жыл бұрын
Consider yourself lucky, with Tinnitus I get to hear the passive buzzer full volume, 24/7, with it turned off, in a drawer. As for the buzzer on the bread board can't get it loud enough to hear over the one in my head.
@ayushmanjain40083 жыл бұрын
Just slightly touch the buzzer and do not cover the top. You would be able to feel the tone
@MaxRelativo3 жыл бұрын
Congrats, Bory! I think most of the guys of your age should be so pro-active!
@frankswift51193 жыл бұрын
I'm in my seventy's and I cannot hear any of the sounds but my wife can.
@dancorwin92322 жыл бұрын
Hey paul! Really loving this series. I'm not sure if your musically inclined at all, but as a musician myself is trying to get into electrical engineering, the reason those first few buzzes you were making "sound like music notes" as you put it is because they actually ARE musical notes! When you were tinkering around with the delay time and setting it fro my 1ms to 2ms and 3ms and so on, you are actually creating what's called an Overtone Series of notes! It's one of the fundamental Bridges between sound waves and our modern understanding of music. You may have already known this, but I figured I would point it out as a shout out to any other musically inclined engineers!
@tashadurrahman4 жыл бұрын
I did the the homework assignment and it went perfectly well! YAAYYYYY!
@Sheredo Жыл бұрын
Hi Paul, great lesson as always! In case someone, like me, is watching only now, 2 things: 1) Just to make sure I did the equation correctly, I printed the value of both my tone and my potval, exptecting that: -If potval=0, then tone=60. -if potval=1023, then tone=10.000 Initially I had problems 'cause when potval was equal to 1023, my tone was something like 9.670 Then I realized that I set the tone as an INT instead of a FLOAT! In the video you did the same, but withot the serial monitor I think you didn't realize this. Changing the tone into a FLOAT made everything right. 2) Even though my math was correct, the tone I was hearing seemed a lot different than yours. I discovered that it was due the serial.print I put in the code. Reading the comments of this video, I discovered that I could keep the print if I changed the baud rate of the serial monitor into something higher! (1.000.000 was the minimum to not have distortion).
@simpjkee8 ай бұрын
I was having all these issues as well.
@simpjkee8 ай бұрын
I tried this again tonight. With the higher baud rate it sounds much better, but it still sounds very distorted for me. It sounds like something an experimental prog rock band would do like Pink Floyd or something. It's doesn't sound anything like a tone a flute or something would make.
@MarvelBi7 ай бұрын
Dude thank you so much I thought it was just ne
@m00se224 жыл бұрын
I was able to make a little alarm and authentication circuit depending on whether the user enters a correct password or not using the serial monitor. Thanks for putting this information out there! With what I've learned from you, I feel comfortable taking on my own projects more so than before with Arduino.
@henderic03 жыл бұрын
Those beeping noises made my bird go absolutely bonkers 😅.
@itimariu4 ай бұрын
Heh, I was joking that I built a cat-waker-up'er.
@RahulMishra-ov4nr3 жыл бұрын
This is the first time I didn't do the project on my own but later realized I could've done it if I tried harder. Great videos keep up the good work.
@kananabdlyv Жыл бұрын
Mr.McWhorter I am very thankful that your channel popped up in my KZbin recommendations. I was looking for a good Arduino teacher, and in a short period of time I found you. Although I had a great experience with programming before learning Arduino, your videos really helped me to actually visualize the process happening behind my code. I carefully listen to your homeworks, and more importantly, do not cheat :) I especially liked this lesson's homework (very enjoyable). Thank you for everything so far.
@kananabdlyv Жыл бұрын
Also thanks for liking my comment 🙏
@S24W2 Жыл бұрын
Me too 😊
@MardinBodley4 ай бұрын
Paul you are brilliant and I went way over the top with the homework built a 9 button tactile switch keyboard in the key of A. Icalculated for major triads for A D and E major 3 rows for A C# and E 2nd row D F#.... and E G A microsecond delay off 2240 for A . So C# delay for mark and space would be 12th root of 2 = 1.0596 raised to the power of 4 and inverted and multiplied by 2240. The idea of for this concept came from 1976 when a guitar student built a guitar but equally spaced the frets 1 inch apart absolutely unplayable. I did not know the equation. He was not happy and smashed the guitar to pieces outside my flat. Well move forward to 2019 and I solved the conundrum (from first principles without using the internet) as above but instead of 2240 delay. The 4th fret position of A is string length is 25 inches x 1/ (12th root of 2 raised to the power of 4 x 110 hz )
@gilnasty822 жыл бұрын
Math has never been my strongest skill! But after playing with this circuit and tweaking the formula numerous times, I have a much better understanding of what's happening! Thanks Paul!!
@simontopley4771 Жыл бұрын
Confess, i did struggle with this one somewhat, i get stuck on the maths, working out these formulae at my age isn't so easy. Thanks again.
@charless7043 жыл бұрын
Paul, @ 9:45, you said when the potentiometer is turned to the left the delay is 10,000 microsecond delay, and when turned to the right it is a 60 microsecond delay. I believe your linear equation is flipped, if you will. Obviously, it still works, just with the tone changing backwards as originally described. Love the videos. Nice work
@danwolfe76653 жыл бұрын
I thought the same thing Charles.
@revupreview3 жыл бұрын
@@danwolfe7665 Me too.
@brightenpeer135610 ай бұрын
Me too!
@Coffee-hh6we2 ай бұрын
me too!
@426F6F Жыл бұрын
That formula took me like 10 mins to work out on my own 😅 I like this form of logical thinking though, it's good practice!
@jstro-hobbytech3 жыл бұрын
figured it out! most personally rewarding lesson yet. thank you so much Paul, you have no idea what these classes are doing for my mental health.
@paulmcwhorter3 жыл бұрын
Actually, it is incredibly good for mental health to create something. Build something, grow something, cook something, make something. All incredibly healthy. I think a lot of people on lock down are binging on Netflix, silly cat videos, and inappropriate internet content, and really think it is driving people into depression and mental illness.
@octogintillion Жыл бұрын
I got the formula right, but I did it way less elegantly. 😅The way I thought it out is that you have to go from potVal=0 to tone=60, and the only way to do that is to add 60 to 0. Then if you would continue with the 10000/1023 like we did previously to get tone=10,000 for potVal=1023, you would actually end up with 10060 since you added 60 before. So I just subtracted 60 from 10,000 to get the value to divide by 1023. I love that you show the "right" way to solve problems like this! Keep up the great work.
@rakowumusic51433 жыл бұрын
Such a great content. I have already learned so much about the circuits. For those who like to make music :) int outPin1 = 13; int c = 472; int d = 420; int e = 375; int f = 353; int g = 315; int a = 280; int b = 249; //delay int dt = 100; int minim = 2000; int crotchet = 1000; int quaver = 500; int semiquaver = 250; void setup() { pinMode(outPin1,OUTPUT); } void note(int duration,int note,int pause){ for(int i=0;i
@rakowumusic51433 жыл бұрын
(I have also made pirates of the caribbean :D)
@XHuang-hv5cj2 жыл бұрын
Nice work! how long did this take you?
@itimariu4 ай бұрын
Thank you :) I downloaded and tried it.
@robertnelson18024 жыл бұрын
I used variable for buzzH, buzzL, potH & potL (all integers adn it still seemed to work) then used a variable based equation. I also put print statements in the loop but had to take them out as they were causing the tone generator to just click. Took me a little while to realise that it was the print statements that were doing that. Keep up the great work - loving the course.
@JohnB-r6c Жыл бұрын
Wondering why with a delay after the print code (Serial.print(); with delay after creates only clicks?? Without delay, no clicks! delays of 500, and 1000 ms. the clicks occur.
@Anonymous-yy5qr3 жыл бұрын
The satisfaction that I get after doing your assignment without your help is immeasurable ❤️
@muhammadrafiqulislamkhan69943 жыл бұрын
Few day I busy with my room construction resetup that is why I can not attend your lesson but I am back. And would say you are a Messaih for me. I do not understand why I understand your all words so easily. What is the reason? I have tried another Arduino video but as you no one for me. You are a perfect teacher. Day after day overwhemingly I just watch and learn from you. You are such a kind teacher. Thanks for you. God bless you.
@carlos20045 жыл бұрын
for anyone doing the Serial.println(potVal) command, i think it messes up the timing for the tones. even when using numbers and not using the potVal, i couldn't get mine to work. but as soon as i deleted the println command, the tones worked perfectly with value, and the potVal.
@mengkin58365 жыл бұрын
heyy, i had this problem too and i found out its due to the baud rate, as you increase the baud rate the sound will get better, i was shocked too when i finally found out
@TheKverbeeck4 жыл бұрын
Thank you Meng and Carlos, that solved the issue i had. Printing more text (data) per line deforms the tones even more. String msg = "Delay (Tone) is: "; Serial.println(msg + buzzTimepot); So i changed the baudrate to 2000000 and now all is well.
@joeb.fromsydneyaustralia53134 жыл бұрын
I had the same problem... getting rid of the Serial fixed it.
@trakeC4 жыл бұрын
I had the same issue. And just fyi instead of deleting your code just go through and add // in front of the lines of code you are unsure about instead of deleting it. That will make it a note and not part of the process. This way you can verify an action before fully acting on it. It's a common practice in code troubleshooting. Other languages have different commands but in this case its //
@chrisjohnson67654 жыл бұрын
A good debugging process for this is to use the // comment lines in front of the suspect line to test it without deleting it.
@erikburman5302 жыл бұрын
Holy Moly! At 61 years of age this is the first time since high school algebra that I've truly understood how to apply the equation for a straight line. That sad little equation has been lying dormant in some cobwebbed recess of my mind until today.
@TMRu223113 жыл бұрын
This was a fun lesson, reminded me of the "Library Tormentor" project I did in high school many years ago (1986). I added a switch to the buzzer to turn it on/off and my cats thanked me for it :D
@jasonbrown2674 Жыл бұрын
I got it! Amazed myself. Thanks Paul, great lesson 👍
@paulmcwhorter Жыл бұрын
Great job!
@StefanEckhardt-y6r Жыл бұрын
Hello Paul, I tried the excercise on my own, as you recommended....but got a difference in solving the excercise. You said....if you turn the potentiometer to the left, have a delay of 10.000 microseconds....to the right 60 microseconds? Right? If yes, to the potentiometer to the left will return a potValue of 0. So the combination of x and y will be: if the potValue will be zero, the delay should be 10.000 microseconds...and vice versa to the right....potValue 1023 will return a delay of 60. The equation will then be different: y=-9,7165+10.000. If I misunderstood your instructions....nonetheless a big thanks, because the result was: I LEARNED IT!! Best regards!
@hasan-motam2 жыл бұрын
This assignment helped me to understand passive buzzers. Thanks Paul.
@KenJacobson-v8vАй бұрын
This one was tough; I had trouble with the math calculation to obtain the correct formula; I need to study up on my math for calculation of straight line; but thanks for walking us through it. The resulting circuit really amazing and worked like a charm
@Японскийшагзашагом Жыл бұрын
Thank you very much for the great lesson! I did the assignment using if statements in the beginning, and I am ashamed to admit, that I watched the beginning of the homework explanation before finishing it on my own. I will work on my math! Thank you very much again, you are a true inspiration, and I am so happy to learn from you. All the best!
@paulmcwhorter Жыл бұрын
Excellent!
@the_real_sauce_boss3 жыл бұрын
This was my favorite lesson so far, I struggled trying to make sure that the delaytime never dropped below 60, but the coffee helped me get through it! Thank you so much for these videos, they make it so much easier for beginners like me to learn. I enjoy them so much I spent 8 hours watching your videos yesterday!
@paulmcwhorter3 жыл бұрын
Great job!
@dannycollins5698 Жыл бұрын
Interesting sounds with this one.
@dubrocadidier45832 жыл бұрын
This was fun . I had the mathematics right but was confused between the delay and delayMicroseconds. It is NOW clear from your explanations . Thanks Paul , you are a blessing .
@njsk8rdan2 жыл бұрын
I am having fun going along with these videos. When you said "that's annoying I am going to unplug it" I said "that's why I added a 'while(potVal>1000)' statement. Wanted to make sure I could get to somewhere on the potentiometer where it wouldn't make any sound. 🤣
@paulrockwell99143 жыл бұрын
I'm an experienced software guy (dusting off some long-dormant C coding) making the foray into circuits and microcontrollers now that I'm retired. Nice progression from the relatively short lesson 23 to lesson 24 with the passive buzzer. Love it when lessons have a logical progression.
@jdecker98344 ай бұрын
Another great lesson Paul! As for the tone pitch, I think the frequency you hear should be 1/(2 * toneVal). Since you're basically creating a square wave to drive the buzzer and your toneVal is the time for half of 1 cycle, then 2 * your toneVal equals the period of your waveform (time of 1 cycle). The inverse of the period is the frequency. It would be cool to put an o-scope on your buzzPin to verify the frequency.
@damonbostrom685710 ай бұрын
I'm really getting a lot out of this series! I've worked through each tutorial so far. Thank you for producing this class! I hope that you will cover midi compliance eventually.
@michaeljenkins23453 жыл бұрын
The Elego kit is a wonder in packing engineering and a physical paradox all in one! Items are packed so full of stuff and yet so neatly, but once you remove items, you'll never get them all back in the way it was. I have used a separate tool tray that is now full, as well as the Elego kit tray which is somehow still full! Mind blown!
@marcovichcamposilva40823 жыл бұрын
Thank you very much mr. Paul. i`ve been watching your lessons the way i even dream about arduino,really. i failed in this homework, thats the path to knoledge. I wish the best for you and those who love you.
@CarolMartinYoutuable2 жыл бұрын
Math has always been a weak point for me but thanks to your lessons, I've been able to do this. I was able to do the homework without any help other than the comments below when I didn't get the right tones because of the print statements in my code and the low baud rate. When I removed the print statements (or at least narrowed them to one print statement) it all worked beautifully. Thanks again Paul
@krishamsub.subedichhetri58953 жыл бұрын
I think instead of digital write if we analogwrite we can also use a potentiometer to vary the loudness of the buzzer, because the higher the voltage/Amplitude the louder the sound.
@johndavid3604 жыл бұрын
Even though I don’t have a passive buzzer I’m still going to watch this video for consistency!
@danwolfe76653 жыл бұрын
Loved the homework assignment, really made me think and do a little math. I did it opposite mathmatically so my equation was Y=-9.7165(X)+10000
@brightenpeer135610 ай бұрын
I did that, too!
@KenJacobson-v8vАй бұрын
Thanks!
@paulmcwhorterАй бұрын
Thanks! Really appreciate the support
@robjameson79654 жыл бұрын
'Passive', the "BLUE LED" of the buzzer world! Todays a special day! : )
@davidransier Жыл бұрын
I struggled a bit with this lesson. It turns out that I had three Serial.Print statements to help debug the resistor value versus the Buzzer timer value. I was outputting 60-10000 microseconds properly but it sounded awful - then I removed the print statements and all was good. Those dang print statements are s-l-o-www! It was a good debugging exercise!
@paulmcwhorter Жыл бұрын
Yes print statements are really slow and will affect your timing on things.
@berlinjackson18476 ай бұрын
I just turned 71 also. Im with you on that
@hedgewicksattempts2 жыл бұрын
Banging my head against the wall on this homework for a bit, just getting a clicking sound out of my buzzer. Ended up boosting the baud to 115200 and now it's working great! Time to unpause and see how you made this!
@hedgewicksattempts2 жыл бұрын
Maybe it's because I was printing my values in the Serial Monitor at the same time?
@paulmcwhorter2 жыл бұрын
Yes that will throw off the timing.
@techbymo2 жыл бұрын
I hadn't done math in a long time and this homework assignment shook some rust off of my brain but glad I could do it on my own with some minor issues haha
@426F6F Жыл бұрын
I wanted to print my tone in the Serial monitor but it only seems to be able to reach its highest when I use a high Baud rate and I have no idea why. Also, if I don't use the Serial monitor it sounds perfect. I guess the action of printing the value in the while loop introduced a tiny delay which distorts or lowers the frequency.
@samueltheprogrammer6145 Жыл бұрын
yes, that is right, when you put "Serial.println()" in your code it slows down the speed of your Arduino a lot. Samuel
@theknottyworkshopgeoffjung5294 жыл бұрын
Paul, I believe that you ask that the 10,000 mS tome (lowest) be on the left and the 60 mS (highest ) be on the right. This would make the equation a negative 9940 or change the polarity of the pot.
@revupreview3 жыл бұрын
Yep, that's what he did. But I still got it working even though my formula is a bit different: potVal = analogRead(potPin); // Get potentiometer value. buzzVal = (1023.0 - potVal) * (9940.0 / 1023.0) + 60.0; // Calculate delay time in microseconds. soundTone(buzzVal); // Make a sound. (I wrote a simple soundTone function to make the sound.)
@jaytea232 жыл бұрын
Great lesson as always! One minor thing, you switched the delay times from what you told us in the homework. So you wanted us to have a delay of 10,000 microseconds when potVal is 0, and 60 microseconds when potVal is 1023. So the equation would be a little different: y= (-9940/1023)x + 10,000
@ronaldjensen29483 жыл бұрын
The frequency you get out of his code is 1/(2*buzzTime2 * 1e-6). For example, if buzzTime2 is 80, the frequency is 6250 Hz.
@jnorris8649 Жыл бұрын
I would’ve used the map() function for the tone & potentiometer value. Good algebra refresher, though.
@batticha4624 жыл бұрын
The hearing of high frequency tones depend on age, the younger the higher frequency to hear
@vitustillebeck49654 жыл бұрын
yeah. thats why i heard all of em at 13. but thats just because im young.
@tedparker6403 жыл бұрын
I'm sorry, I can't hear you. can you please type louder?
@nobleforks8911 Жыл бұрын
did the same thing with a LDR as well to show my 5YO(whom is very interested in the projects that I do), so he could play with it without ruining my pot(wouldn't be the first one he wrecked).
@zudzifudushzy2 жыл бұрын
That homework was super fun! I think you said 60 and 10000 in your assignment the other way around than in your solution, but that doesn't really matter :D I tried to work with as many variables as possible and added Serial.print with a high baudrate to have a look at the values. The high baudrate is to not mess up the timing of the tones. Here is my version of the homework: int buzzPin = 8; int buzzTime; float rightFreq = 60; float leftFreq = 10000; int potPin = A1; int potVal; void setup() { // put your setup code here, to run once: pinMode(buzzPin, OUTPUT); pinMode(potPin, INPUT); Serial.begin(2000000); } void loop() { // put your main code here, to run repeatedly: potVal = analogRead(potPin); buzzTime = ((rightFreq - leftFreq) / 1023 * potVal + leftFreq); Serial.print(potVal); Serial.print(" "); Serial.println(buzzTime); digitalWrite(buzzPin, HIGH); delayMicroseconds(buzzTime); digitalWrite(buzzPin, LOW); delayMicroseconds(buzzTime); }
@jasonford14 жыл бұрын
For extra credit, I looked up the tone() function and discovered it ranges from 31Hz to 4978Hz. I plotted tone on the y-axis and potentiometer values of 0 to 1023 on the x-axis. I then used y=mx+b to convert the potentiometer signal to a tone between 31Hz and 4978Hz with one exception. I made 31Hz == noTone(). Now my ears can rest! Time to pause having completed 19-24 and 48/49 today. It has been a great day of learning! I look forward to photoresistors and photodetectors next.
@michaeljenkins23453 жыл бұрын
Ive paused the tutorial at 3:08 because I saw something and I wanted to write in here before moving on... If we set the " int buzzTime=1 & int buzzTime2=2 " wont the program think we're setting those as variables for pins 1 & 2?
@stefannilsson769210 ай бұрын
Thanks for the good examples with different calculations. They help very well. Thank you very much for that
@ijlie3 жыл бұрын
Hi Paul, combined tutorial 18 and this one to have the buzz time asked for in the serial monitor. Gave me fast interaction and saved some upload time.
@erygion4 жыл бұрын
Great video Mr. Mcwhorter. My wife ran away! She doesn't like piezo speakers at all, thank you.
@MrJohnjamesboyd4 жыл бұрын
So did my wife, but with my industrial deafness I didn’t realise it was working lol
@InfectedCreations4 жыл бұрын
If you try this don,t print anything to your serial monitor because this has influence on your tone. ✌👍 Another great tutorial. Boom.😊🤣
@MrsKJurotich13 сағат бұрын
Got a little hung up on the equation (forgot to enclose it all in parentheses), but a quick look back at the dimmable LED lesson helped me figure it out. Only slight downside is my daughter thought the TV was about to explode when my buzzer went off. Lol!
@paulmcwhorter10 сағат бұрын
Haha, yeah, those passive buzzers can get pretty loud. Glad you figured out the equation.
@iplayflute3 жыл бұрын
Tip on how to boost the volume of your buzzer: tear out a piece of paper and place it above the buzzer, the larger diaphragm results in more vibration.
@stevemorgan35974 жыл бұрын
Hi Paul. I like the way you teach. Good explanations and visuals. I learned a long time ago in calculus courses to draw diagrams and graphs because it helps with the math. Once the formulas are determined, it makes the programming so much easier. Thanks for all you do.
@Dieselfitter015 жыл бұрын
Fantastic lesson on the passive buzzer. So much can be the influence on the buzzer with this kit. Oh BTW my AI parts started to arrive today, through your links that is. Case with fan, Micro card, Jetson Nano, Pi Camera, 110 power supply and the WiFi. I am expecting the Webcam tomorrow. The wireless keyboard and mouse were too far off for me to wait for so I will try what I already have and if that fails I will hit the local store. This AI Project is something I think everyone here would be interested in. Great content as always and look foreword to whats in store next.
@paulmcwhorter5 жыл бұрын
I will admit I have been pulling my hair out on the nano the last couple of weeks, and almost ready to give up, but think I got some stuff figured out today. Bleeding edge technology which means it is not all figured out yet. Really want to do a series on this now. I have gotten some pretty cool things going now.
@louandpaulanickles71724 жыл бұрын
I did my math a little differently in the homework, but got the same results. I did part of the calculation outside of the program then entered the quotient directly in the program. I used buzzVal=((potVal*9.7165)+60);. Tell me, what is the purpose of the decimal point after your whole numbers in the calculation?
@dannycollins5698 Жыл бұрын
Thank you!
@michaeldrake25122 жыл бұрын
These buzzer ones I definitely hooked a switch up to reduce how much buzzing I actually had to endure haha. Hot tip for anyone else.
@prussianblue2224 жыл бұрын
First, GREAT series. I am a hardware guy and learning to program is going well with your help. HOWEVER, it seems that timers in Arduino, maybe especially the older UNO (mine is 10 years old?) are really finicky. I was having lots of problems with this assignment and I had the serial monitor turned on so that I could see what was happening with all my values. Serial monitor seemed fine but the tones were jumping, not smooth. Was pulling my hair out until I turned off the serial monitor then Voila! It worked perfectly. Just something to watch for.
@matthewgroves3671 Жыл бұрын
hi Paul is there any learning resources you can recommend that will help with the maths and calculating the line etc I'm really struggling with understanding it, had to cheat and copy 🙄
@alanford79333 жыл бұрын
Really good. I used Serial.println (with the good old trusty 9600 Baud rate) and realized that I was not starting at 60. Then went back and included it. Good to do the homework and pick up own mistakes.
@youssefshepl68927 ай бұрын
I would like to confirm that in a linear equation, the independent variable, which in this case is time (timeT), should be placed on the x-axis, while the dependent variable should be placed on the y-axis. If there are any corrections or additional insights regarding this understanding, I would greatly appreciate your guidance.
@paulmcwhorter7 ай бұрын
That is correct.
@shvideo14 жыл бұрын
A. Very cool and fun project. Thank you for the math as well.
@GraveGear4 жыл бұрын
Completely forgot to plug everything into the equation after I found the slope. Was trying to convert with just "m"! Thanks for the video!
@lloydbotway59304 жыл бұрын
This works quite well. More fun: check out the tone() function, which does much of this automatically.
@hussambarodi80144 жыл бұрын
Very nice, very simple and very easy. Even I learned programming since 30 years, but I am ready to leave everything behind me and go forward for Arduino with Mr. Paul. Thank you Sir, and your students are really lucky. If you allow me to suggest, or maybe request, something. I am not sure if you keep the examples that you made saved in your computer or not, and if so, I hope if you can share them with us. It was my fault that I did not write since the first lesson, and now after I completed 24 lessons, I am unable to go back and check them all, why, because I am thirsty for more and more lessons
@davebroster55602 жыл бұрын
I noticed that when you set the assignment you wanted the Low tone (10000) to be with the pot to the left and the high tone (60) all the way to the right, so that the tone increases as you turn the pot clockwise. I achieved this with a slight modification to the equation as shown below: Original: toneVal = (potVal * ( 9940 .0/ 1023.0) ) + 60; Reversed: toneVal = 10000 - (potVal * ( 9940 .0/ 1023.0) ); I also used two floats for my maxVal (10000.0) and minVal(60.0) and used these in my equation so I could easily play about with the range, below is my working code for the calculations: //Read In the Raw Pot Value potVal = analogRead(potPin); //Calculate the increment dictated by the range buzzInc = (maxVal - minVal) / 1023.0; //Now calculate the toneVal from maxVal, potVal and buzzInc toneVal = maxVal - (potVal * buzzInc); Hope this is useful for the other viewers
@abufunaisan27872 жыл бұрын
this is the comment I've been searching for. I thought I was the only one that observed the discrepancies.
@Julia-xd8qw Жыл бұрын
You're right, same method as you, in this case, toneVol=10000-9940./1023.*potVol; 60 is the highest tone, 10000 is the lowerst.
@user-vn7ce5ig1z5 жыл бұрын
0:24 - It looks pretty empty to me. Sometimes green-screen glitches are amusing. 20:00 - The voice-recognition A.I. will demonetize this video for animal-cruelty.
@pradeepdube1398 Жыл бұрын
Hi Paul, Looks like I got confused with the terminology of ALL THE WAY LEFT and ALL THE WAY RIGHT you used. I understood it like this 1. delay = 10000 microseconds (when voltage V =0) 2. delay = 60 microseconds (when voltage V = 1023) Good thing is this created a line with slope towards right which was little difficult to create the equation. had to recall my mechanical engineering lectures from university as well as go through your previous Math notes I took. I was able to get the equation finally. delay = (-9940./1023.)*(voltage-1023.)+60; I printed over serial monitor to check my math part and formula calculation Arduino is doing in the background. Got perfect 10000 delay at 0V and 60 delay at 5V (1023 in Arduino). Rotating the potentiometer sounded like a world war siren... LOL..
@johnk27434 жыл бұрын
Today my "The Most Complete Starter Kit" arrived so finally I could use the buzzer! Up until now was able to use components that I already had. Great kit, should have bought this together with my first Arduino! Lot's of thing I collected earlier but this kit is something else! The icecoffee is not for me, I stick to the hot variant. No sugar, no cream and strong! My viewing binge from the first video up to this one was fun and very informative! The (hot) coffee, my impatience and holding my breath (and some shouting at the screen as well, I confess) made it an intesive journey. In these pandemic times it's fun to play around with this Arduino stuff (while learning as well) and the partial lockdown we're under (I'm from the Netherlands) makes it a great way to spend the time at home. Your coding standards I recognize from my early coding days with Clipper. Thanks a lot for your teaching, it's fun, informative and very well produced! I wonder what tools you use making your video's. Thank you so much Paul!
@ianneill91884 жыл бұрын
Ok, I am a bit late to the game here, but I really enjoyed this lesson. I think the repeat line graph math refresher was super. Many thanks for your diligence and time.
@randallg.bennett36953 жыл бұрын
Hi again Paul, Thank you for the lesson, it made sense, and I did need your help (a bit) after the lesson and before the code writing, but it all made sense after I watched you perform the functions. Much appreciated!
@neillaw21212 жыл бұрын
I am still working through the tutorials. Sometimes 3 in a row, sometimes none for a few days. I have been searching the web for an answer to why ALL my sketches, interupt when connected to the PC. This passive buzzer program for example, I worked through it, i get the tone and periodically it stops and starts again. In the RGB the light goes out and comes on again. In the binary counter it would start, stop at some point, then start again. I also noted the busy LED on the UNO board flashing occasionally. So I believe it must be communicating with the PC, and halting the program while it exchanges data with the PC. If I disconnect from the PC and run off the 9V battery it doesnt happen. I also have trouble uploading from PC to the UNO board. I have to click quite a few times, I get the orange, COM port was busy quite a few times, then eventually it goes in, reinforcing my thinking on the COM chatter interferring with desired operations. Any tips on settings I can adjust anywhere to stop the interupts on running programs and uploads?
@eurekaibanez36973 жыл бұрын
Thank you sir only all your works I did successfully to be operational.
@dcar12343 жыл бұрын
When you gave the home work originally did you say it backwards? You said all the way to the L you wanted 10K and all the way to the right you wanted 60? Would that not have been a negative slope?
@billcrow54035 жыл бұрын
Great video. I change the toneVal around and played with those
@rexbarr_57834 жыл бұрын
These lessons are awesome!!!! You tha' man Paul!!
@Traxonen2 жыл бұрын
Really interesting video. I'm lerning fast and easyly! Thanks a lot!
@theteenengineer75895 жыл бұрын
Great content Paul!
@danbishop40354 жыл бұрын
I appreciate learning and practicing the math...I had a careless moment and i used a period in void setup "pinMode(potPin.INPUT);" instead of "pinMode(potPin,INPUT);" which generated an exit status 1 Error compiling for board Arduino Uno. Nothing a few moments of debugging couldn't cure.
@ErlankBru9 ай бұрын
This was a very cool assignment!🤠
@ericb200320003 жыл бұрын
For anyone having problems with the math, I suggest looking into the map function. mappedValue = map(variable name to map, minVal, maxVal, newMinVal, newMaxVal)
@paulmcwhorter3 жыл бұрын
NO! For anyone having trouble with the math, I suggest LEARNING THE MATH. I teach how to do it in this and other lessons. Is is like saying, those who dont want to learn to program just copy and paste his code. This channel is about LEARNING and part of that learning, is learning how to do the math.
@karelenmarritkruyswijk3935 жыл бұрын
Thank you very much. Reases the question if you can calculate this strait forwards to a tone in kHz.
@EFoxVN3 жыл бұрын
Just a quick question/suggestion: Should toneVal not perhaps have been a float rather than an integer to get a smoother transition? Blessings
@paulrockwell99143 жыл бұрын
toneVal has to ultimately be an integer because the delayMicroseconds function is expecting an integer value for the delay. But we perform the calculations of the toneVal in float to get a more precise representation of where the toneVal point should be for a given potVal value.
@sumantkumbar50584 жыл бұрын
Toneval is int data type. The eqation would put an integer into toneval
@EdwardRLyons3 жыл бұрын
Question: Shouldn't the toneVal variable be a float, not an int? Otherwise there's no point in using the periods in (9940./1023.). And wouldn't it improve the sound from the buzzer, too? (I'm waiting for a passive buzzer to arrive, so I've not yet built the circuit and done the coding for myself.)
@gabrielhamrle27793 жыл бұрын
Is there a way to download music on arduino and played with passive buzzers?
@fetchfooldin32524 жыл бұрын
I've just learnt how to fuse between math and programs. I diiid the assignment before completing the video. But forgot +60 in the equation (-_-;) Thank you so muuuuch
@basiceducation1131 Жыл бұрын
Need your help.I have made an electric car.want to give it fake engine sound with Arduino..and programming
@syedibraheemzeeshan806 Жыл бұрын
It is so heart breaking that as more and more we go deeper in lessons, Views are also getting shorter. Very little people are commited :(