GPIO pin can be used to read values off from sensor devices and monitor sensor data.
Serial console to display the read of the value from GND/3.3V pins of ESP8266
Requirements
- Breadboard
- Jumper wires
- USB cable
- ESP8266 D1 Wemos Mini
- CH340 Driver (USB-UART)
- Arduino IDE (ESP8266 Library / Board : Lolin D1 Mini)
Layout

Arduino IDE Sketch Code
// Setup the GPIO 5 Pin
// D1 Wemos Mini pin GPIO5
int inputPin = 5;
int val = 0;
void setup() {
// Setup the serial console baud speed
Serial.begin(115200);
pinMode(inputPin, INPUT);
}
void loop() {
// Read the value off GPIO 5 Pin
val = digitalRead(inputPin);
// Display state of input pin
Serial.println(val);
delay(1000);
}
