Im using the arduino uno as a digital potentiometer I want it to output a sensor value of 0 which is no problem But, how would I express that i don't want any value being output at all?
recognize:
Im using the arduino uno as a digital potentiometer I want it to output a sensor value of 0 which is no problem But, how would I express that i don't want any value being output at all?
AS a digital potentiometer or WITH a digital potentiometer?
Post your code (using the code tags) and wiring diagram to give us a better insight on what exactly you are doing.
int pin1 = A0;
void setup() {
}
void loop() {
analogWrite(pin1, 0);
delay(1000)
analogWrite(pin1, ) // I dont want out put anything here
delay(1000)
}
Im new to arduino and coding.
recognize:
int pin1 = A0;
void setup() {
}
void loop() {
analogWrite(pin1, 0);
delay(1000)
analogWrite(pin1, ) // I dont want out put anything here
delay(1000)
}
Im new to arduino and coding.
I know it might be counter intuitive, by the analogWrite() command isn't used with the analog pins. They are used with the PWM pins. More info here: analogWrite() - Arduino Reference
From a more general perspective, what are your trying to accomplish? Any output pin HAS to have a value. It's either HIGH or LOW. There isn't a way to have it not output anything.
Thanks for the help. problem solved!
recognize:
When they are pushed down the potentiometer output is 0.
As in the resistance is 0 or it acts as a digital input where the connection is broken?