I need to code a linear potentiometer and a water valve in Arduino. But I'm not good at it, so I am trying to code it using an ardublock. The problem is linear potentiometer and water valve are not included in my ardublock. Can I download these part and import it to the software? and where can I download it? Thank you in advance!
Did it ever occur to you that this is NOT the Ardublock forum?
A potentiometer ( linear, logarithmic or any other) is very easy to read using native arduino commands.
Just connect the wiper to an analog input, and assuming a > 5k potentiometer, the two outer connections to ground and +5Volts respectively. Use analogRead().
A water valve is usually either on or off. Simply declare an Arduino pin as output and connect a relay module (or a simple relay and a switching transistor) and power your water valve with that.
Thank you 6v6gt, we figure out how to code it manually before we've read your post. But honestly I do appreciate your answer. Thank you very much.
And for you PaulS, then sorry. I've read a thread about ardublock in arduino forum and no one says that they won't answer it for it's not an ardublock forum or that it is prohibited to talk about anything else besides arduino. Nevertheless, it is still related to arduino. So I ask also something about it, but I guess not all people are nice.