Last active
February 8, 2021 07:48
-
-
Save elktros/e817ddb3a8aba8a3da80c1555d73efb8 to your computer and use it in GitHub Desktop.
Code for ESP8266 ADC Output printing over Serial Monitor.
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
#define analogPin A0 /* ESP8266 Analog Pin ADC0 = A0 */ | |
int adcValue = 0; /* Variable to store Output of ADC */ | |
void setup() | |
{ | |
Serial.begin(115200); /* Initialize serial communication at 115200 */ | |
} | |
void loop() | |
{ | |
adcValue = analogRead(analogPin); /* Read the Analog Input value */ | |
/* Print the output in the Serial Monitor */ | |
Serial.print("ADC Value = "); | |
Serial.println(adcValue); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment