saving . . . saved Can we give potentiometer value via program has been deleted. Can we give potentiometer value via program has been hidden .
Can we give potentiometer value via program
Title
Question
Sir,
I have a small doubt that can we give the potentiometer value through arduino code itself instead of rotating the knob of potentiometer.   If so please let me know.

Arduino Pulse-Width-Modulation 11-12 min 0-10 sec 20-04-20, 11:24 a.m. Mvspc

Answers:

Yes you can. Instead of motorValue = map(potValue, 0, 1023, 0, 255);directly provide motorValue as some integer between 0 and 255.
eg, motorValue = 150;

A better and fun way will be to initiate Serial and input values real-time directly from serial monitor and pass it to motorValue.The command for passing values from Serial will be : motorValue = Serial.read();

Cheers!
20-04-20, 12:10 p.m. vishnuEaswaran


Log-in to answer to this question.