Skip to content

Instantly share code, notes, and snippets.

@hollyhockberry
Created October 22, 2021 11:09
Show Gist options
  • Save hollyhockberry/063f5887d6929720417945da6e80cf64 to your computer and use it in GitHub Desktop.
Save hollyhockberry/063f5887d6929720417945da6e80cf64 to your computer and use it in GitHub Desktop.
M5 Fader unit: Fader in
#include <Arduino.h>
constexpr int pin_fader = 33;
void setup() {
Serial.begin(115200);
::pinMode(pin_fader, INPUT);
}
void loop() {
const auto v = ::analogRead(pin_fader);
Serial.printf("%d\r\n", v);
::delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment