How to use Analog Joysticks with the PICO
Vložit
- čas přidán 21. 12. 2022
- Learn how to use analog joysticks with your PICO. In this tutorial, Chris explains which ones are good, which are bad, how to check them, where to purchase them and most importantly, how to write code to use them. Awesome input devices, especially for those trying to control something that moves!
SEE ASSOCIATED VIDEOS:
Raspberry Pi PICO Setup and Preparation for Programming • Raspberry Pi PICO Setu...
PICO Machine Library PIN Class • PICO Machine Library P...
Read Analog Voltage with the PICO • Read Analog Voltage wi...
VISIT OUR COMPANION WEBSITE -- makingstuffwithchrisdehut.com
DOWNLOAD FILES HERE -- makingstuffwithchrisdehut.com... - Věda a technologie
Awesome video! have a merry Christmas !
Thank you Ian, you have a wonderful Christmas too!
great tutorial, learned a lot , thanks😊
Glad it was helpful!
Cheers
Chris
nice job Chris as always as it is amazing the quality of what we are getting as I found a similar situation with some embedded controllers myself
Thank you Kevin, much appreciated! Unfortunately, when price is the only consideration, value simply cannot be had.
@@MakingStuffwithChrisDeHut well said my friend so very true
Log pots was the type you were trying to recall as in logarithmic. Thanks for all your vids.
Hi nigelworwood8530,
That sounds about right!!!!
Thanks,
Chris
This will no doubt save me some frustration, thanks. BTW I found having an old analogue “sweep” meter around invaluable for visualising pot action.
Good morning,
Yes, I love analog meters too, they tell a much better story than the digital readouts. In machining, there are digital dial indicators and "analog" mechanical dial indicators. The mechanicals ones with that moving needle just tell you so much more!!!!
Cheers
Chris
@@MakingStuffwithChrisDeHut and, as an added bonus in machining, the mechanical indicators don’t need any batteries.
@@mechaform ABSOLUTELY!!!!!!!
The joystick that just hit the extremes reminds me of how gamepads for the PC worked before the advent of USB. The PC gameport expects you to put 5V through 100k Ohm potentiometers for its four analogue axes. The digital inputs were just for four buttons. Gamepads had circuitry that would output 0/50k/100k for an axis depending on where the gamepad was or wasn't being pressed, essentially implementing a digital input on an analogue interface.
Isn't that crazy, or should I say frustrating!!!
Cheers!
Chris
For an easier time you can use the math map function to control the range of values.
Hi John,
Thanks for the suggestion! I am not familiar with that function but by its name I suspect it is worth checking out as this sort of thing happens a lot.
Cheers!
Chris
Would the map function help ? Seems ADC can only work with a max of 3.3 V !
I am not familiar with the Map function, however, the PICO is a 3.3volt device. As such, I would not try to force it to do something it is not designed to do. I am curious though, why would you need it to use a different voltage?
@@MakingStuffwithChrisDeHut voltage limit info was intended as a warning to others.
Hello Chris...nice job, good explanation, but is it possible to use two analog joysticks with the PICO since PICO have only 3 analog pins and we need 4? If it is possible-how? Thanks
Unfortunately not. There are 4 analog inputs on the RP2040, unfortunately, one is routed to the on board temp sensor on the PICO. There might be another board available with all 4 ADCs brought out to pins though.
Cheers!
Chris
AdaFruit doesn't manufacture crap. They just add value to cheap Chinese products through quality control and documentation.
They do have a pick and place line with reflow oven...