Once I needed to make a project with an lcd, but I only had one potentiometer that I needed it elsewhere. So, I googled some things about potentiometers and how they work and came up with this!
How a potentiometer works?A potentiometer is like a resistor that you can change values of. It works pretty simple.
It's just a "wire"(resistive strip) that makes the current flow through it from ground to vcc. While the current flows through, the wiper touches the resistive strip in different places and the current that flows through the strip goes to the wiper and depending on the place, different current comes out from the output.
So what?So, a potentiometer is just a metal wire that has different current flowing through it. So, by varying the current that flows through the resistive strip we can make our own potentiometer without a wiper!
const int contrast = 13;
void setup() {
analogWrite(contrast, 130);
By the process of try I figured that contrast 130 works the best.
ConclusionCongratulations!
You have just made a "potentiometer" by yourself.
You can also make an lcd without a resistor using the same method of analogWrite() function. But I havn't tried that yet.
Comments
Please log in or sign up to comment.