Skip to content

Instantly share code, notes, and snippets.

@MartinRGB
Last active November 17, 2023 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinRGB/58bf850551a2df5b505962510571e4f5 to your computer and use it in GitHub Desktop.
Save MartinRGB/58bf850551a2df5b505962510571e4f5 to your computer and use it in GitHub Desktop.

  • Orange for LED value
  • Blue for slider Value
#define SLIDER_PIN A4
#define LED_PIN 10

float sliderValue;  //variable to store sensor value

void setup() {
  Serial.begin(9600);
  pinMode(SLIDER_PIN,OUTPUT);
}

void loop() {
  sliderValue = analogRead(SLIDER_PIN);
  Serial.println(sliderValue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment