Help using slide potentiometer


#1

I am trying to use a slide potentiometer and seeing strange behavior. I thought this would be used exactly like the normal potentiometer but maybe I’m doing something wrong.

I can connect a normal (knob) potentiometer and display the value on the seven segment display and all is fine. I see values from 0 to 976. But if I use the slide potentiometer then I see values that are from about 400 to 520. But what is really strange is that if I don’t move the potentiometer at all the values will still drift substantially. For example, the 520 above will drift down to below 400 in just a few seconds. Effectively the potentiometer is unusable. I have two potentiometers and they both behave the same way so I don’t think that just one is defective.

Is there some other way to read these potentiometers?

Thanks,

-Pete


#2

What kind of potentiometer do You use?


#3

The makeblock slide potentiometer.


#4

Hi sandbender,

Which program block do you use to read the value from the slide sandbender?

For slide potentiometer, please use the program for Joystick Module in mBlock and read the X value. And the value range for slid potentiometer is from -490 to 533.
image


#5

Using the joystick X axis does indeed work. Thanks for the help.