ESP32: analogRead

From OnnoWiki
Jump to navigation Jump to search
void setup() {
  Serial.begin(115200);
}

void loop() {
  int sensorReading = analogRead(4); // connect ke D4
  Serial.println(sensorReading); 
  delay(1000);
}
// nilai max 4096

Pranala Menarik