No video

Raspberry Pi Pico W LESSON 5: Reading Analog Voltages Using a Potentiometer

  Рет қаралды 18,512

Paul McWhorter

Paul McWhorter

Күн бұрын

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 class we will be using the Sunfounder Raspberry Pi Pico W Keppler Kit. It will make things a lot easier if we are working on identical hardware. the link below is to amazon, and is for the identical hardware I will be using in this entire class.
amzn.to/3ubMRs1
In this introductory video, I will show how to read analog voltages using the Raspberry Pi PIco W. Fortunately, this is much easier than on the Raspberry PI, sine the Pico has a built in analog to digital converter. I will show how to read voltages using a potentiometer. This class is for absolute beginners, and I do not assume you already understand the material I am presenting. My goal is not to 'Show Off', but to genuinely teach you how you can do this type of work and projects on your own. I will show all work step-by-step, with clear instructions Enjoy!
Find more great content at my WEB site,
toptechboy.com
[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. ]
#raspberrypipico
#tutorial
#analoginput

Пікірлер: 175
@dannycollins5698
@dannycollins5698 Жыл бұрын
Also, the world needs more Mr. McWhorters teaching us to become Engineers or become better Engineers and less people making click bait garbage videos.
@SteveTempleton-yh9oz
@SteveTempleton-yh9oz 8 ай бұрын
Yep you’re right, enough info to keep us interested, enough step by step to make sure we understand, and enough homework to ensure we are confident and ready for the next step.
@preadsy6912
@preadsy6912 Жыл бұрын
Nice one ☺️☺️☺️ i love your videos very much and I am just in 6th grade but learnt so much
@quaternion-pi
@quaternion-pi Жыл бұрын
Wow, Preadsy 69, I wish I understood this when I was in 6th grade. If Paul had taught 6th grade, I think I could have. Encomiums to both you and Paul.
@tntragan
@tntragan Жыл бұрын
That's awesome. I too wish I had Paul as a math and computer teacher when I was in school. But thanks to his efforts and KZbin we get to learn at any age.
@ke7uia
@ke7uia Жыл бұрын
I loved electronics in the 6th grade. That was back in 1964. But I did not have a mentor. Someone to coach me along the way.
@keithlohmeyer
@keithlohmeyer Жыл бұрын
Math is your friend. Thanks Paul for all you do.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Keith, if there is one thing I wish people would get from this channel is the power and simplicity of using linear equations. It is sad that math is taught so poorly such that we grow up hating math. As I browsed some of the homework solutions, I see people are still struggleing. I deliberately made this assignment where the slope is negative, and the problem has a y intercept and it seems people froze.
@ke7uia
@ke7uia Жыл бұрын
@@paulmcwhorter I had to start with y=mx+b. Then I could work through it. You did not have this as a sample.
@parshvapatel8484
@parshvapatel8484 Жыл бұрын
Finally found some meaningful use of linear equation rather than just predicting population of a random town after x year's. Thak you for your effort.
@dj51
@dj51 Жыл бұрын
Using the equation that Paul gave us, I substituted 100 for 3.3 and it worked.
@justmc62
@justmc62 Жыл бұрын
Thanks for another great lesson Paul... Struggled with the line equations while completing your Arduino series.. Hope to get more confidence going forward on this series... It amazes me how much algebra I have forgotten from HS after not using it for over 40 years ..😦
@LetsCalculateSomething
@LetsCalculateSomething Жыл бұрын
Justmc - This will help you... kzbin.info/www/bejne/nIPQdJtoqq1gq7s
@qzorn4440
@qzorn4440 11 ай бұрын
I noticed the Fritzing software. So, I downloaded the Windows 64 bit for 8.00€ 8.41 Dollars. I am using this Lesson 5 example to update an old Eddy Current thickness meter 0 to 0.5 inches display reading vs the sensor output 0V to 10VDC scaled down to 0 to 3.3VDC. The Raspberry Pi Pico W will be battery operated. 😎 Thank you Paul for the inspiration of something new.
@rammuga1341
@rammuga1341 Жыл бұрын
Paul the Guru. I did my homework and I'm doing my homework most of the time, if I had built this discipline during my college days, I would have been in different level. Your punch on the face makes me guilty to skip the homework. Its god gift I found this channel Homework Point 1 = (320, 100) Point 2 = (65535, 0) Slope = -100/65215 Equation of the Voltage line = (-100/65215)*potentioMeterVal + (6400/13043) + 100 The Values are amazing and most of the times its accurate
@doordars
@doordars Жыл бұрын
Thanks a lot for your this very interesting and useful video. Can we find the equation by curve fitting values of x (0-3.3) and y (0-65535) with least square method to get the two constants a and b in y = a + b x.
@WilliamBurlingame
@WilliamBurlingame Жыл бұрын
Today's assignment didn't require much change from your example. I used variables for the numbers in your code(MaxY, MinY, MaxX, MinX). Since there is so much noise in the readings, I applied a lowpass filter to smooth things out and I set the initial value at the mid point. As I turn the potentiometer, the displayed values change slower than the potentiometer is turned. Couldn't resist the low pass filter temptation.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Excellent use of low pass filter!
@kenblanch4178
@kenblanch4178 Жыл бұрын
like to see you code
@jamescullins2709
@jamescullins2709 7 ай бұрын
I have always loved math, just didn't know how to use it. thank you, thank you, thank you.
@paulmcwhorter
@paulmcwhorter 7 ай бұрын
Great to hear!
@masman1st
@masman1st Ай бұрын
Pulled pot and added flex wire to ADC and flex wire to negative rail and tested batteries >= 3 volts.
@warrior012788026
@warrior012788026 Жыл бұрын
i really like your tutorial, right now i am learning Arduino series, python, and Pico W (all from your vdo).
@johanverheyden8828
@johanverheyden8828 4 күн бұрын
nearly finished with your arduino4 Wifi lessons i started this series now, and try to accomplish +/- 1 lesson a day ....
@freddyveza
@freddyveza Жыл бұрын
I made the homework, but not a video this time... To avoid negative calculations from readings, used round() function to round up or down results, here a extract of my readings: Read = 224 Result = 99.71 V = 100 Read = 3984 Result = 93.98 V = 94 Read = 22725 Result = 65.46 V = 65 Read = 32567 Result = 49.96 V = 50 Read = 34008 Result = 47.95 V = 48 Read = 37305 Result = 42.85 V = 43 Read = 43178 Result = 33.91 V = 34 Read = 50140 Result = 23.26 V = 23 Read = 60606 Result = 7.16 V = 7 Read = 65535 Result = -0.31 V = 0 Also, result was formatted two decimals through f format string with this pattern: ":.2f"
@donaldhoudek2889
@donaldhoudek2889 Жыл бұрын
Paul, you ACED it again! Another GREAT video... Thanks
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Glad you liked it!
@randysnow6171
@randysnow6171 Жыл бұрын
A pro, as expected explains like a pro!
@TheUnofficialMaker
@TheUnofficialMaker Жыл бұрын
well done, math is the universe!
@bkairosh8164
@bkairosh8164 Жыл бұрын
Love the way you teach Paul. Any chance you could do a video on your teaching technique?
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Possibly!
@bkairosh8164
@bkairosh8164 Жыл бұрын
@@paulmcwhorter Great! Look forward to it. 🙂
@jyvben1520
@jyvben1520 Жыл бұрын
That 3.3 division should be outside the loop, calculate it once and store it in a variable.
@lorisrobots
@lorisrobots Жыл бұрын
Thanks for a great lesson Paul!
@larryplatzek9017
@larryplatzek9017 Жыл бұрын
Another Great lesson Paul,
@warrenscorner
@warrenscorner Жыл бұрын
Hey Paul, you lost me after x-430. The second equation said 430-3.3/65106. Where did that second 3.3/65106 come from? Math has never been my friend. It’s 4th and long but I’m gonna go for it.
@justmc62
@justmc62 Жыл бұрын
That tripped me up also... I believe my trouble comes from my lack of understanding algebraic executions. I understand the principles of the line equations but executiing them properly is another story.
@ke7uia
@ke7uia Жыл бұрын
I got confused at this point also. Paul can you find another method to teach this slope?
@patrickfox-roberts7528
@patrickfox-roberts7528 Жыл бұрын
The 3.3/65106 is multiplying the whole BRACKET with (x - 430) in it so it has to multiply the "x" FIRST and THEN it has to multiply the " - 430 " so you get 3.3/65106 * x and then 3.3/65106 * (-430) which is same as 3.3/65106 x - 430*3.3/65106 [it does't matter which order you multiply in a*b = b*a]
@patrickfox-roberts7528
@patrickfox-roberts7528 Жыл бұрын
whenever algebra gets confusing think of a simple example with just numbers to check what's going on, so here the same sort of thing would be change all those big numbers and x for eg [2](3-1) --> well 3-1 = 2 so that gives 2*2 = 4 easy .THEN do it Paul's way above by mutiplying the brackets out so do 2 * 3 and then do 2* -1 ........2*3 is 6, 2 * (-1) is -2 6-2 = 4 ......... same answer
@zbigniewloboda3393
@zbigniewloboda3393 Жыл бұрын
Great Presentation ❤
@kenstephens221
@kenstephens221 Жыл бұрын
Mr. McWhorter, could you show us how you find these functions and what values to give them from the library documentation? Do you use the examples provided with the library as the documentation?
@edSabio572
@edSabio572 Жыл бұрын
Paul, here are my results: The voltage is noisy and had to round to 2 decimals... 50.57 49.29 50.57 49.51 50.4 50.67 50.33 49.44 49.69 49.69 50.08 49.59 50.42
@edSabio572
@edSabio572 Жыл бұрын
Thanks Paul! I am on it!!!
@ParshvaPatel-ib9lm
@ParshvaPatel-ib9lm Жыл бұрын
I have few questions here, lets say we have similar setup one gpio pin that outputs 3.3v connected to the ground with a resistor in between .and if I have a third pin that acts as analogue to digital converter and reads value so does it act like voltmeter? lets say I place it across that fixed resistor that can take all of 3.3 v would I be still able to measure 3.3v as output and 0v if I place it on two ends can I think The middle pin in the video as a voltmeter where one of the sides is touched to the ground and the other can be placed anywhere
@TheTechRancher
@TheTechRancher Жыл бұрын
If I understand your question right. Reading the middle pin from the potentiometer is like using a voltmeter. Yes. But for it to print out the value that is more readable to us, you will have to do the point slope math or you can use the .map() , but you are not challenging yourself by working on the math. But the first part of your question, I'm not fully able to get my mind around it.
@ariviyalarivom6507
@ariviyalarivom6507 11 ай бұрын
my pot value only varies from 10k to 44k. tested the potentiometer, no prob with that, also tested in different adc pins still got the same values.
@ahmad12150
@ahmad12150 Ай бұрын
Hi Sir, I tried to put u8 instead of u16. i thought it would make it 8 bit value but it didn't work.
@ahmad12150
@ahmad12150 Ай бұрын
can't we make it 8 or lower bit value ? if we can then why didn't we make it 8 or lower bit value. i am a newbie so i don't understand these things .Can you help plz .
@GUEST-mq3nr
@GUEST-mq3nr 9 ай бұрын
HI all, I don't know if I am doing something wrong, however my meters readings are not constant, at the low scale the numbers can jump between 8k and 10k at start, at the high scale it can start at 107-11,000 but then drops to 8k and increases back to 11,000. I am under the impression that low end should remain at far lower numbers and high stay high. What am I doing incorrectly?
@georgeth160
@georgeth160 8 ай бұрын
# Code I used for the Homework import machine # imports the entire machine library from time import sleep potPin=28 #Creates varible potPin and connects it to GPIO pin #28 x=100 #Creates variable and sets its value myPot=machine.ADC(potPin) #Creates myPot sets it to the 'machine' library, ADC is for Analog- # Digital Converter, which is at the potPin variable while True: potVal=myPot.read_u16() #Creates a variable and makes it value to the value of whatever is #read off of myPot. u16 is for a 16 bit number print(potVal) voltage=(x/65105)*potVal-(430*x/65105) print (voltage) sleep(.5)
@GoutamDAS-ls1wb
@GoutamDAS-ls1wb Жыл бұрын
Hello Paul and thanks immensely for the pico W videos which I will soon share with my daughter (BME, UT Austin, doing her MD-PhD @ TAMU & beginning research). I was wondering if the Pico W is only 12-bit, then why did you choose a 16-bit number? Also 0 turns out to be around 430-- is this the "zero offset voltage" Can this be adjusted on the Pico ? Thanks a bunch for your response in anticipation.
@warrior012788026
@warrior012788026 Жыл бұрын
I got different of Potentiometer from your teaching, mine(label 10k), so my question are: 1, What is the value label on your Potentiometer?(When reading potval in your vdo, it shows range(430 to 65535)) 2, I may got different read value of Potentiometer from your teaching right?(Mine reading potval , it show range(430 to 1088 ))
@jimallen4860
@jimallen4860 Жыл бұрын
Algebra 101 was 50 years ago (but I still have the textbook!).
@MrBandiszabo
@MrBandiszabo Жыл бұрын
Homework for lesson 5 kzbin.info/www/bejne/raSmi4l6h66pa6s reads 100 when Pot is turned down, and 0 when pot is turned up
@ke7uia
@ke7uia Жыл бұрын
Fixed my link: Here is my homework for lesson #5. This has a negative slope, and my values are almost perfect. 100= 99.9999, 0 sometimes goes negative. I think I can calculate slopes and reinsert into a formula. I also show some other methods with a spreadsheet file. kzbin.info/www/bejne/habMd6F8qtN-b6c
@ke7uia
@ke7uia Жыл бұрын
Legend
@ke7uia
@ke7uia Жыл бұрын
fixed the link kzbin.info/www/bejne/habMd6F8qtN-b6c
@ke7uia
@ke7uia Жыл бұрын
I also corrected the rounding problem in the print statement thus: print(potVal, round(scaleVal) I also modified the sleep to sleep(2).
@farshidowrang2762
@farshidowrang2762 Жыл бұрын
So nice! Thank you very much!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Glad you like it!
@greenfoodpower6961
@greenfoodpower6961 Жыл бұрын
Excellent!
@Quack_34
@Quack_34 6 ай бұрын
mathematics is meant for these things, not for exams and marks , which most of so called math teachers do
@paulmcwhorter
@paulmcwhorter 6 ай бұрын
Indeed!
@AsadKhan-bd6et
@AsadKhan-bd6et Жыл бұрын
Hi Paul, can we make apartment building intercom entry system using Raspberry Pi Pico??
@danny12345
@danny12345 Жыл бұрын
Thank you
@khaledgamal7923
@khaledgamal7923 Жыл бұрын
great like always ☺
@JUMPINGDONUT_
@JUMPINGDONUT_ 4 ай бұрын
I touched it and got kicked by electricity 😂😂
@akashdeadpool2824
@akashdeadpool2824 11 ай бұрын
# codeeee :> from machine import Pin from time import sleep from random import randint a=Pin(12,Pin.OUT) b=Pin(13,Pin.OUT) c=Pin(14,Pin.OUT) d=Pin(15,Pin.OUT) while True: a.value(randint(0,1)) b.value(randint(0,1)) c.value(randint(0,1)) d.value(randint(0,1)) sleep(.07)
@colepdx187
@colepdx187 Жыл бұрын
I'm wondering about something at the 30:00 mark. It looks like the equation went from y = m * (x -x1) to y = m * x - m * x1 Am I seeing that right? And I'm wondering why? Certainly both ways get the same result?
@paulmcwhorter
@paulmcwhorter Жыл бұрын
You distribute the m to get the equation reduced to the standard slope intercept form of the line, which is y=mx+b
@colepdx187
@colepdx187 Жыл бұрын
@@paulmcwhorter Thanks. That got my pointed in the right direction.
@kev67uk
@kev67uk Жыл бұрын
This week's homework completed: kzbin.info/www/bejne/m5_IgYxje891gqc Thanks for getting my brain working again this week Paul. I haven't used those particular brain cells for many years! 😉
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@peterbush3972
@peterbush3972 Жыл бұрын
import machine from time import sleep myPot=28 myPot=machine.ADC(myPot) while True: potVal=myPot.read_u16() voltage=(3.3/65247)*potVal-(288*3.3/65247) percent=(100/65247)*potVal-(288*100/65247) print('Voltage',voltage,'Percent',int(percent),'potVal',potVal) sleep(.5) It works.
@GCRickerNH
@GCRickerNH Жыл бұрын
I saw elsewhere on the Internet to Connect the positive to pin 35 ADC_REF (row 6 on the breadboard) and the negative to pin 33 AGND (row 8 on the breadboard). The Pico has special noise reduction circuits to avoid power supply jitter. Is this true? Can someone explain to me what this means? I tried reading the Pico’s Datasheet about ADC, but don’t I understand it. Should we be using a different power source for better accuracy, and if so, how do you wire it?
@paulmcwhorter
@paulmcwhorter Жыл бұрын
YOu can supply an externeal calibrated reference if you want more exact results, but for most cases it is not needed.
@warrior012788026
@warrior012788026 Жыл бұрын
hi, i am facing the problem; after doing the maths and coding for finding Voltage, it shows" TypeError: unsupported types for __mul__: 'float', 'bound_method' ", Can anyone help me please,
@charlotteswift
@charlotteswift Жыл бұрын
You'll need to give us more details than that!
@ke7uia
@ke7uia Жыл бұрын
Wait a minute. Currently when we turn the dial left it shows 0 voltage, and turn right it show 3.3 volts. The home work is to turn left and the value show 100, turn right and the value show 0. Is this correct? Is this the home work? This means the slope will be negative. Is this correct?
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Do not fear a negative slope. I deliberately designed this homework to have a negative slope AND to have a y intercept. Just work it through.
@danielsaenz5570
@danielsaenz5570 Жыл бұрын
Hey Paul! I have a question. Point slope form: y - y1 = m(x-x1). In my example y1 = 0, m = 2, and x1 = 1, so we get: y=[2](x-1) Here's my question: Do you really have to use the disruptive property? Wouldn't y=[2](x-1) give the EXCACT same value as: y=[2]*(x) - [2]*(1)?? Is the only reason we distribute is to make the equation in slope intercept form (y=mx+b)?? Hopefully this isn't too confusing! Thanks so much Paul!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
In math we need to reduce our answers to standard forms. Standard form is y= mx + b. Reduce your answers to that because it is the standard. Plus now, when you look at the equation, you see precisely what the slope and y intercept are. Sort of like saying 6/4 is exactly the same as 3/2 yet the standard is to reduce our fraction and never leave a reducable fraction.
@danielsaenz5570
@danielsaenz5570 Жыл бұрын
@@paulmcwhorter thanks sooo much!!!
@farshidowrang2762
@farshidowrang2762 Жыл бұрын
Takk!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Really appreciate that, Thanks!
@anthonyanzalone8491
@anthonyanzalone8491 Жыл бұрын
Hey team! Can someone help me understand Paul's example? I'm getting lost at timestamp 30:07. I understand when y - y1 = m (x - x1) becomes y = [3.3/65106]*(x-430).... This part makes sense. The next part is where I'm not sure where we're going or where we've gone... How does y = [3.3/65106]*(x-430) become y = [3.3/65536] * [430*3.3/65106]? It's really the last part; the "[430*3.3/65106]" part. Is that [x1*y2/x2]? If so, how did we get there? Any help is greatly appreciated!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
You distribute m. THink of it this way: y=m(x - x1) becomes y=m*x - m*x1 Now look at the numbers. You 'distribute' the m to remove the parenthesis
@xprmntlav8r
@xprmntlav8r Жыл бұрын
This one stumped me for awhile but I finally worked it out. kzbin.info/www/bejne/ppSTaomHqqeoprs
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@danielsaenz5570
@danielsaenz5570 Жыл бұрын
Hey Paul! Here's the point slope form: y - y1 = m(x - x1) after using the distributive property you get: y - y1 = (m*x) - (m*x1) You said that this was in standard form, y = mx + b, Is the (m*x) term the slope? And is the (- m*x1) term the y-intercept? I understand how we've got there perfectly, and I understand the math, but I DON'T see how it's in y = mx + b form. Thanks Paul!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
The slope is still m. y is equal to the slope times x plus the y intercept. Hence, the w intercept would be -m*x1
@danielsaenz5570
@danielsaenz5570 Жыл бұрын
@@paulmcwhorterThanks for clearing things up, Paul!
@LetsCalculateSomething
@LetsCalculateSomething Жыл бұрын
Please see this video... it will help you. kzbin.info/www/bejne/nIPQdJtoqq1gq7s
@scottwait3585
@scottwait3585 Жыл бұрын
Thanks Paul!
@escheytt9326
@escheytt9326 Жыл бұрын
Hi Paul, A good session. As a respectful patreon and someone that looks forward to your sessions, I would like to suggest that you consider leveraging the Pico W wifi capabilities in the future. Specifically, consider addressing how to put a server on the Pico W that can be accessed from clients with the ability to edit code on the server as well as how to access data stored on the server from sensors connected to the Pico W. This could build upon your Raspberry Pi sessions relative to a home security device that you offered some months ago. This would have wifi being hosted by the Pico W and have sensors storing data and activation information on the Pico W that could be downloaded by clients. Could also include the ability to modify the code being ran on the Pico W via wifi clients. The expansion of this learning project could eventually, include the addition of a camera and storing images on the server which could be downloaded via the wifi. Thanks for considering this for future lessons. Best regards, Ed
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Ed, we have to cover the basics first for the beginners, but then we will get to the WiFi stuff. Yep, it is really important and one of the main benefits of the pixo
@ke7uia
@ke7uia Жыл бұрын
Yeah, that is way way way over my head at this poing.
@chases9870
@chases9870 Жыл бұрын
i am lengend
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@jimworden9021
@jimworden9021 7 ай бұрын
Paul, Here is my homework for this lesson. kzbin.info/www/bejne/aJWnoJ2LgrZ5eKs I do have a couple of comments. The first is mainly for any new programmers seeing this. Please remember, comments are not only your friend, they're the friend of the poor sucker that has to come along behind you to fix (no code is ever perfect) or expand on your work. Don't assume that what you are thinking when you wrote the code is obvious to everyone else. Just assume you're smarter than the next poor schlub and explain your thinking. Remember, in a couple of months or years YOU may be that poor schlub. Second (and this sort of dovetails with the first) the point you made about assigning "potVal" at the beginning of your code is excellent. I was a bit disappointed that you didn't follow thru with that logic in your sue of the "slope" value. You repeated the constant value "3.3/65106" a couple of times in your code. This not only introduces an opportunity for error the compiler cannot catch it forces the next poor schlub (me in this case) to mentally stop each time and remember what that string of number represents. Not really a big deal in these little snips of code but IMHO it's a bad habit that the beginners you are teaching should not pick up. Minor quibbles but in my 50+ years of software engineering I've been the poor schlub more times than I care (or can) remember. Keep up the good work. Thanks for your efforts.
@robakers6127
@robakers6127 Жыл бұрын
Easy lesson. one question.... it was like a floating pin, readings at first were not stable at all. I swiched to another potentiometer and things got better but not perfect. Do we need something like a pull up or pull down switch in the circut. I tried adding 333 to the negative side, and no change. I am totally new to electronic part. Sorry if this is dump question. here is my video . Great clas thank for taking us through each step of the math. I really need the refresher. oooh video looks a little more stable, that is becuase I added rounding to the result. kzbin.info7a7cjQTYVOg
@TheDynatomic
@TheDynatomic Ай бұрын
import machine from time import sleep potPin=28 myPot=machine.ADC(potPin) potValMin = 100 potValMax = 65535 voltageMin = 0 voltageMax = 3.3 while True: potVal=myPot.read_u16() m = (voltageMax - voltageMin) / (potValMax - potValMin) voltage = ((m * potVal) - (m * potValMin)) + potValMin print("potVal:", potVal, " voltage:", voltage) sleep(1)
@TimNudd0525
@TimNudd0525 Жыл бұрын
Beginner Based Homework for Lesson 5: kzbin.info/www/bejne/eZPTk3auraeEo5I I apologize for it being late, I had some family issues that demanded my attention. And man I really need to brush back up on my math! 🤣
@colepdx187
@colepdx187 Жыл бұрын
My solution to the Lesson 5 Assignment: kzbin.info/www/bejne/jabGYptoo8-ledU
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Amazing!
@quaternion-pi
@quaternion-pi Жыл бұрын
Assignment #5: kzbin.info/www/bejne/sKKWYoNueLOIfZI&ab_channel=Quaternion A learning experience motivated by Paul McWhorter, incognito mathematician...
@ke7uia
@ke7uia Жыл бұрын
You probably have a cool setup. Yet, I have to translate what I am seeing without any voice. Which means I am not able to follow you very well.
@charlotteswift
@charlotteswift Жыл бұрын
Here is the link to my homework: kzbin.info/www/bejne/raWmkqyVn8h3h7M
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@danielsaenz5570
@danielsaenz5570 Жыл бұрын
Here's my homework solution: kzbin.info/www/bejne/aZjNf4qiq9JlpZI
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@snowman58able
@snowman58able Жыл бұрын
kzbin.info/www/bejne/ooi0lKmIlKubnqs Above is my solution to the homework I had an old oled and included that as a display in addition to my computer screen. I watched several videos to figure out how to use the oled.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@kenblanch4178
@kenblanch4178 Жыл бұрын
This is my solution to the homework kzbin.info/www/bejne/qqTFq2R4r96Sjac
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@bigbogeyface
@bigbogeyface Жыл бұрын
Here's my homework: kzbin.info/www/bejne/hpOqnaKCYtSUhrM ✌️🙂
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@bigbogeyface
@bigbogeyface Жыл бұрын
⚠️ Don't copy this homework guys! ⚠️ I didn't really do it the way that Mr McWhorter would have preferred 🙅🙅🙅 I simply flipped the direction of the formula like it was a burger 🍔🤤😋 from a positive direction to a negative direction by subtracting 100 🤷🤦💁🙋
@charlotteswift
@charlotteswift Жыл бұрын
@@bigbogeyface But you didn't subtract 100. You took the value that you would use for displaying the value from 0 - 100 and then subtracted it from 100. If you follow Paul's video for calculating the slope and then y, using y1 = 100 (instead of 0) and y2 = 0 (instead of 3.3), then you get the exact same equation that you're using. Now that's lucky
@TheTechRancher
@TheTechRancher Жыл бұрын
Update to my Homework. kzbin.info/www/bejne/aKaql59qgax5Y9E I fixed my parentheses in my math results. Go easy on me Paul. I got in a hury and overlook it. LOL.
@arlo4051
@arlo4051 Жыл бұрын
Tossing in my homework, kzbin.info/www/bejne/h5XQf56uac9pbK8, struggled with this one to get it working correct but the math worked, just had to understand what it was telling me. #DOTHEMATH
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@aravjain
@aravjain 8 ай бұрын
Thank you for the lesson! Here's my homework: kzbin.infoCNHp32niGXQ?feature=share
@paulmcwhorter
@paulmcwhorter 8 ай бұрын
Excellent!
@KarstonHunt
@KarstonHunt Жыл бұрын
Lesson 5 Homework: kzbin.info/www/bejne/Z3qmpGR6lNZkiac I can see how this will be very useful in future projects!
@briankelly4095
@briankelly4095 Жыл бұрын
A solid solution AND a music bed in the homework video. What more can we ask for!
@stevetalley9775
@stevetalley9775 Жыл бұрын
Link to homework: kzbin.infoPxCd1x2TST4
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@karliskide2460
@karliskide2460 Жыл бұрын
Thank you for the lesson! Here is my homework for today: kzbin.info/www/bejne/poeWaJ-hrsZ7i68
@peterwadham7965
@peterwadham7965 13 күн бұрын
Great Lesson Paul, link to homework solution kzbin.info/www/bejne/j3axinqil9qio9U
@paulmcwhorter
@paulmcwhorter 13 күн бұрын
LEGEND!
@rassulkuatov6160
@rassulkuatov6160 13 күн бұрын
Great as usual! The homework: kzbin.info/www/bejne/rWi4koGhpL6Aesksi=mc4hUH-PPdRnkV0W
@S24W2
@S24W2 11 ай бұрын
Watch at 1.25x
@savanladva1197
@savanladva1197 Жыл бұрын
Here is my homework: kzbin.info/www/bejne/i5eXppmQj5p8fas
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@jameslewellen150
@jameslewellen150 Жыл бұрын
Here is a link to my homework for this lesson. kzbin.info/www/bejne/hajKfKCgjduqm5o
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Excellent. Play around with your math a little more, there are a few mistakes.
@jameslewellen150
@jameslewellen150 Жыл бұрын
@@paulmcwhorter It is hard to believe that I have collage level calculus behind me but cannot perform simple algebra. Although it has been at least 40 years. I knew I would have difficulty doing calculus again but algebra should not have been a problem. I am embarrassed. I finally got the results I was looking for. Thanks for the videos
@ke7uia
@ke7uia Жыл бұрын
Seems like the homework this time is calculating the correct slope. Perhaps you could explain your formulas more. I had to run the formulas about 30 times before I could under stand it and explain it. Once the formula is good the video should display the correct values. I do not understand Pauls part of the formula = ((-100/65216)*320). What does this represent? Also I could not see your display.
@patrickfox-roberts7528
@patrickfox-roberts7528 Жыл бұрын
@@ke7uia where is this ? ((-100/65216)*320)
@daveslack2755
@daveslack2755 6 ай бұрын
You make math easy to understand. homework for this lesson kzbin.info/www/bejne/qmiZfYh_pKt2kJY
@paulmcwhorter
@paulmcwhorter 6 ай бұрын
LEGEND!
@djicedragon855
@djicedragon855 3 ай бұрын
Homework assignment. kzbin.info/www/bejne/bIeXoYVjls6Ulas Having trouble with it.
@TheTechRancher
@TheTechRancher Жыл бұрын
Homework Done. kzbin.info/www/bejne/Zp3Ck4R4j5eYr5Y Thank you for taking the time to teach us the math we need to understand to become better at this.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 12 МЛН
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 11 МЛН
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 80 МЛН
Reading Analog Inputs | Raspberry Pi Pico Workshop: Chapter 2.6
8:46
Core Electronics
Рет қаралды 1,9 М.
Open Source Analog ASIC design: Entire Process
40:11
Psychogenic Technologies
Рет қаралды 40 М.
Raspberry Pi  Pico PIO  - 8 Little Processors You Can Program
31:55
Gary Explains
Рет қаралды 90 М.
Raspberry Pi Pico Clone with 16MB Flash, USB-C, Neopixel, and More!
8:31
Raspberry Pi Pico W LESSON 4: Create a Binary Counter Using the Pico W
22:58
Raspberry Pi Pico W: Wireless Weather Station
17:13
ExplainingComputers
Рет қаралды 286 М.
Voltage Divider For Raspberry Pi/Arduino (4K)
14:08
tsbrownie
Рет қаралды 1,4 М.
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 12 МЛН