Analog sticks with ESP32

I am creating this post, because a lot of people on the forums was strugling with that, but have not unswers, and I really don't know for which reason, but discussions was closed, dispite absence of answer. So here is solution that I found by myself.
This info for those who can't understand why theirs analog sticks has huge dead zone and short working range. This is because you are most likely using ESP32 and it has 3.3 voltage input ADC pins, so even if you power aSticks with 3.3v it will not works as intended, because they specifically build for 5v. So if you anyway want to use this aSticks with esp32 I assume that you need to have some voltage divider on output, but power this sticks with 5v.
I had the same issue, but I also had uno below my hand, so I tried this stick on it too, and it works floweles. So don't worry, they are good aSticks, so you can don't worry about theirs quality.
People doing hard work, so lets appreciate it.

I guess you used a translation program to produce this posting.All is pretty good, except for the "analSticks". You might want to work on editing your post or it just might get deleted.

no, it is my translation, I used this shorten word for fun, if you think it is not appropriate and can make someone discomforted by that, I easily correct it. I don't inted to make something bad to someone:)

Ready:)
I know this shorten word can have two meanings, but obviously I mean not bad one:)

It's not the ESP32's 3V - it's the ESP32's analog input characteristic (lack of linearity, especially toward min and max).

1 Like

Oh, it is really could be the reason of that shrinking of range.
But what is the reason to don't make it linear by default? It would be much more versatale to do so and those one that want to change the curve, will just apply that if they want.

How it is ─

Hmm, but that just looks like curve, that determines possible range, like a clipping. So it is like the same reason, that ADC pins in ESP32 are setUp for 3.3v only, isn't it?
Also range shrink is huge, like 25% max of whole angle of stick.

Of course it's versus "3V", that's its domain.
As you can see at 2.7V it goes non-linear.
An 'analog stick' is a type of joystick. One end is at 3V instead of 5V - it's still a divider.
The ESP32's ADC is barely marginal, depending on your expectation.

Great, understood. Thank you for additional information. Hope this will be helpful for people.

Hi,

Thank you... in other words a proper joystick, not a lever and 4 switches thingy.

Tom.. :grinning: :+1: :coffee: :australia:

That's the way it was with the C64 - one lever and one switch.

(I made mounted a second switch to play SpyHunter with. It came with a tray, actually, to hold a 2nd to use its p.b., but that made it totally lame.)
One was for the machine gun and the extra for the bonus weapon.

image

You mean that C64 and other retro game devices was using not true analog sticks, which means 2 potenciometers for corresponding x and y axis, but just for buttons behind? Oh yeah, as I know N64 was first console that used true aSticks.
Btw, I remember times, when I was developing game for NES. It is fun that amount of buttons is 8, because it uses 8bit variable used as 8 flags with appropriate button press.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.