Last active
September 19, 2024 06:34
-
-
Save antonprafanto/72d717c6d2916927da8918466f3ea77c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const int potPin = 7; // Potentiometer terhubung ke GPIO 7 (Analog ADC1_CH6) | |
| // Variabel untuk menyimpan nilai potensiometer | |
| int potValue = 0; | |
| void setup() { | |
| Serial.begin(115200); | |
| delay(1000); | |
| } | |
| void loop() { | |
| // Membaca nilai potensiometer | |
| potValue = analogRead(potPin); | |
| Serial.println(potValue); | |
| delay(500); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment