Created
October 15, 2021 04:07
-
-
Save hax0kartik/b0454aec948d319a1f274cc8cb52bbb5 to your computer and use it in GitHub Desktop.
This file contains 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
/* This function runs once */ | |
void setup() | |
{ | |
/* initialize serial communication at 9600 bits per second */ | |
Serial.begin(9600); | |
} | |
/* This function runs over and over*/ | |
void loop() | |
{ | |
/* Read the sensor value from the potentiometer connected to A0. 0-1023 */ | |
int sensorValue = analogRead(A0); | |
/* Print the sensor values on serial */ | |
Serial.println(sensorValue); | |
/* Delay a bit for stability */ | |
delay(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment