Raspberry Pi Pico W LESSON 57: Calibrating a Joystick in MicroPython
HTML-код
- Опубликовано: 11 сен 2024
- 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 video, I will show you how to control use a joystick with the Raspberry Pi Pico W using MicroPython. I will show you how to read X and Y values from the joystick. I will then show how to calibrate those raw readings to give more intuitive values for joystick position. After showing this, I will give a homework assignment
[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. ]
#raspberrypipicow
#joystick
#micropython
Great lesson and love the math. Would like to see an explanation of what the magnitude formula is all about and how the formula was derived. Showing this on your pad like you do with the slope calculations, etc. would be very helpfull. You went over this very quickly.
I believe it is an application of the Pythagorean theorem. If you draw a straight line from any coordinate back to the origin, you can create a right triangle where the base (adjacent side) is your x coordinate, the height (opposite side) is your y coordinate, and the long side (hypotenuse) is the distance or magnitude of the point from the origin. You can then simplify A^2 + B^2 = C^2 to find that C = sqrt(A^2 + B^2)
THIS IS ANOTHER GREAT LESSON, THANK YOU PAUL!
Thanks Paul! You take math to a new level of usefulness...Ready to use/deploy.
I am healed and back to your lessons.
Keep them comming. Tanks
Congratulations. Keep up the great content.
Thank you Paul!
Learn a lot from every lesson❤..
Sir, can you please give us the idea of internet of things in future?
👍thank you for everything you do. 🍻
I am legend! For fun, I put a low pass filter in as well.
LEGEND!
Hi there. The pico pi supposed to have a 12bit ADC instead of 16bit ADC. can you possibly elaborate in this statement, as scaling is going to be a bit different when using an OLED for example?
Hi Paul, will there be anymore fusion 360 classes coming up please? Thank you 😊
Lets talk in form of Spherical Coordinates (just because I don't have to define anything, not like I am drawing some analogy here). So, when you say that we have to calculate the angle, do you mean just the θ, or also the ϕ? Because the joystick sitting right at the dead-center, vs it being at the end of the +ve x-axis (equivalent of 0° in the 0°-360° anti-clockwise direction) couldn't possibly mean the same. We have to differentiate it somehow. And hence, we need the angle with respect to x-axis, as well as with the z-axis.
Here is my solution to lesson 56. I also added a wire and code to check for the switch in the joystick.
ruclips.net/user/shortsYT_F6okHYMQ?feature=share
LEGEND!
Here is my attempt at it: ruclips.net/video/wOh8iXDgdgM/видео.html. Thanks for the lesson Paul!
22:26 "there is no such thing as moving" Most respectfully, why is that sir? I mean let's assume a-b=x then a=x+b, now there are 2 explanation:-
1. b has moved from left side to the right side changing minus sign to positive.
2. b has been added to both sides.
I know both have same meaning, but I believe from your point of view point no 1 is wrong. why??
Moving is not a math term. If (y+7)/2 = 6x, can I move the y? can I move the 7? can I move the 2? NO! There is no such thing as moving. The correct math concept is, whatever you do to one side of the equation you do to the other. I could multiply both sides by 2, than I could add 7 to both sides, then I would have y. I did not move anything.
@@paulmcwhorter Thank you
My HWruclips.net/video/z09lgS7XtJ0/видео.html. Sorry posted late. I did it almost immediately but did't get it on RUclips. Really! Honest I did!
Thanks!