Floating potentiometer

Is there an electronic part that acts like a potentiometer, but floats randomly across different levels of resistance?

I want to use it to generate semi-random values for a project.

Is there an electronic part that acts like a potentiometer, but floats randomly across different levels of resistance?

INSUFFICIENT DATA

You need to specifiy the voltage range across the pot.

Also, "floats randomly across different levels of resistance" is meaningless in the language of electronics, which , evidently is not your area of expertise or you wouldn't be asking the question phrased that way. Please clarify what you mean without using the above wording.

If I had to take a SWAG, I would say you are asking for a digital pot driven by a random number generator program but the problem is that digital pots typically only operate at 5V and not higher voltages so if the voltage in question were greater than 5V it wouldn't work.

Well, today's your lucky day: the Arduino IDE comes with a pseudo-random generator: random.

Pieter

P.S: If you don't connect anything to an analog input, it will start to oscillate, producing all kinds of garbage values, depending on how close you put your hands to the pin. If you wanted to, you could measure a floating analog input to get a "random" seed for the random() function. But I think it will be too periodic to use as an actual pseudo-random value, and some values are much more probable than others.

Ever since resistors were created, the goal has been to make them stable and predictable. What you are asking for will make an engineers blood boil....

peterbradley:
I want to use it to generate semi-random values for a project.

Is there any reason why it needs to be externally randomly generated rather than just using the random() function like PieterP recommended?

@saximus, just curious about possible analog approaches. @pieter, thanks for your suggestions. I did experiment with listening to analog inputs, and as you predict, the range of oscillation is a bit small.

peterbradley:
Is there an electronic part that acts like a potentiometer, but floats randomly across different levels of resistance?

I want to use it to generate semi-random values for a project.

Semi-random?
An LDR under disco lights perhaps?

perhaps a gas tank float