Hello,
I have on Arduino Due , one potentiometer, less, wires and resistors and I want to turn on or turn of the led by using the potentiometer. This is my code:
#define LED_PIN 11
#define POTENTIOMETER_PIN A0
void setup()
{
pinMode(LED_PIN, OUTPUT);
}
void loop()
{
int potentiometerValue = analogRead(POTENTIOMETER_PIN);
int brightness = potentiometerValue / 4;
analogWrite(LED_PIN, brightness);
}
But I want also to use serial plotter or serial monitor in order to see the value of potentiometer but I can't. I think that this will be done by command Serial.println but I have managed to do it.
Can anybody else help pe ??
I want also to do this by a push button and a led