pinouttools

ESP32 & Arduino Tutorials

56 free tutorials — OLED displays and 50+ sensors, each with wiring, explained code and a parts list.

OLED

ESP32-C3 SuperMini + OLED (SSD1306): Wiring & Hello World

Wire a 0.96" SSD1306 I2C OLED to an ESP32-C3 SuperMini and print text. Wiring (4 wires): VCC -> 3V3 GND -> GND…

read tutorial →
OLED

OLED Graphics: Shapes, Boxes & Big Text

Go beyond text - draw rectangles, circles and triangles on the SSD1306, and mix font sizes. Wiring is identica…

read tutorial →
OLED

OLED Animation: Bouncing Ball

Your first animation - a ball that bounces around the screen. Teaches the clear -> draw -> display loop that e…

read tutorial →
Sensors

DHT22 on OLED: Live Temperature & Humidity

Read a DHT22 (AM2302) and show live temperature and humidity on the OLED - no PC needed. Wiring: OLED -> VCC=3…

read tutorial →
Sensors

HC-SR04 on OLED: Live Distance Meter

Measure distance with the HC-SR04 ultrasonic sensor and show it in big digits on the OLED - a standalone range…

read tutorial →
Sensors

LDR on OLED: Live Light Meter

Read ambient light with an LDR (photoresistor) and show it as a live percentage and bar graph on the OLED - a …

read tutorial →
Sensors

DHT11 on OLED: Temperature & Humidity

What it is: The DHT11 is a low-cost digital temperature and humidity sensor. It measures 0–50 °C (±2 °C) and 2…

read tutorial →
Sensors

DS18B20 on OLED: 1-Wire Temperature

What it is: The DS18B20 is a precise digital temperature sensor (-55 to +125 °C, ±0.5 °C) that talks over Maxi…

read tutorial →
Sensors

LM35 on OLED: Analog Temperature

What it is: The LM35 is an analog temperature sensor that outputs a voltage directly proportional to temperatu…

read tutorial →
Sensors

TMP36 on OLED: Analog Temperature

What it is: The TMP36 is an analog temperature sensor like the LM35, but with a 500 mV offset so it can read b…

read tutorial →
Sensors

NTC 10k Thermistor on OLED: Temperature

What it is: An NTC thermistor is a resistor whose resistance falls as temperature rises. The common "10k" type…

read tutorial →
Sensors

BMP280 on OLED: Pressure & Temperature

What it is: The BMP280 is a Bosch barometric pressure + temperature sensor. It reads 300–1100 hPa and is accur…

read tutorial →
Sensors

BME280 on OLED: Temp, Humidity & Pressure

What it is: The BME280 is the BMP280's bigger sibling — it adds humidity, so you get temperature, humidity and…

read tutorial →
Sensors

BME680 on OLED: Temp, Humidity, Pressure & Gas

What it is: The BME680 measures temperature, humidity, pressure AND a gas-resistance value that tracks volatil…

read tutorial →
Sensors

AHT20 on OLED: Temperature & Humidity

What it is: The AHT20 is a small, cheap, accurate I2C temperature and humidity sensor (±0.3 °C, ±2 % RH). It's…

read tutorial →
Sensors

SHT31 on OLED: Temperature & Humidity

What it is: The SHT31 (Sensirion) is a high-accuracy I2C temperature and humidity sensor (±0.3 °C, ±2 % RH) wi…

read tutorial →
Sensors

MCP9808 on OLED: Precision Temperature

What it is: The MCP9808 is a high-accuracy digital temperature sensor (±0.25 °C typical, 0.0625 °C resolution)…

read tutorial →
Sensors

MLX90614 on OLED: Non-contact IR Temperature

What it is: The MLX90614 measures the temperature of a surface without touching it, by reading the infrared it…

read tutorial →
Sensors

MAX6675 on OLED: K-Type Thermocouple (High Temp)

What it is: The MAX6675 reads a K-type thermocouple, letting you measure from 0 to 1024 °C — far hotter than a…

read tutorial →
Sensors

DS3231 on OLED: Real-Time Clock + Temperature

What it is: The DS3231 is a very accurate real-time clock (±2 ppm, about a minute a year) with a coin-cell bac…

read tutorial →
Sensors

MQ-2 on OLED: Smoke & LPG Gas

What it is: The MQ-2 is a low-cost gas sensor that responds to smoke, LPG, propane, methane and hydrogen. It's…

read tutorial →
Sensors

MQ-3 on OLED: Alcohol Vapour

What it is: The MQ-3 is tuned for alcohol vapour — the sensor behind DIY breathalysers. It also reacts to benz…

read tutorial →
Sensors

MQ-7 on OLED: Carbon Monoxide (CO)

What it is: The MQ-7 detects carbon monoxide (CO), the invisible, odourless gas from incomplete combustion. Us…

read tutorial →
Sensors

MQ-135 on OLED: Air Quality

What it is: The MQ-135 is a general air-quality sensor sensitive to CO2, ammonia, benzene, smoke and other pol…

read tutorial →
Sensors

CCS811 on OLED: eCO2 & TVOC Air Quality

What it is: The CCS811 is a digital air-quality sensor that outputs an equivalent CO2 (eCO2, 400–8192 ppm) and…

read tutorial →
Sensors

SGP30 on OLED: TVOC & eCO2 Air Quality

What it is: The SGP30 (Sensirion) is a digital indoor-air-quality sensor giving TVOC (0–60000 ppb) and equival…

read tutorial →
Sensors

MH-Z19B on OLED: Real CO2 (NDIR)

What it is: The MH-Z19B is a true NDIR CO2 sensor (0–5000 ppm) — it measures actual carbon dioxide by how much…

read tutorial →
Sensors

PMS5003 on OLED: PM2.5 Air Particulates

What it is: The PMS5003 is a laser particulate sensor that counts fine dust in the air and reports PM1.0, PM2.…

read tutorial →
Sensors

BH1750 on OLED: Light Level in Lux

What it is: The BH1750 is a digital ambient-light sensor that reports real lux (1–65535), unlike an LDR which …

read tutorial →
Sensors

TSL2561 on OLED: Light Level (Broadband + IR)

What it is: The TSL2561 is a light sensor with two photodiodes — one for visible+IR and one for IR only — so i…

read tutorial →
Sensors

TEMT6000 on OLED: Ambient Light

What it is: The TEMT6000 is a simple analog light sensor whose output rises with brightness. Its response is t…

read tutorial →
Sensors

VEML6075 on OLED: UV Index

What it is: The VEML6075 measures ultraviolet light and computes a UV Index (UVI) — the same 0–11+ scale weath…

read tutorial →
Sensors

TCS34725 on OLED: RGB Color Sensor

What it is: The TCS34725 reads the colour of a surface as red, green, blue and clear (brightness) values, with…

read tutorial →
Sensors

APDS9960 on OLED: Proximity & Gesture

What it is: The APDS9960 is the sensor from old smartphones that can detect proximity, ambient light, RGB colo…

read tutorial →
Sensors

Flame Sensor on OLED: Fire Detection

What it is: A flame sensor is an infrared photodiode tuned to the ~760–1100 nm light a flame gives off. It det…

read tutorial →
Sensors

IR Obstacle Sensor on OLED: Obstacle Detection

What it is: An IR obstacle-avoidance sensor has an infrared LED and a receiver side by side. When something re…

read tutorial →
Sensors

HC-SR501 PIR on OLED: Motion Detection

What it is: The HC-SR501 is the classic passive infrared (PIR) motion sensor — the white-dome sensor in burgla…

read tutorial →
Sensors

RCWL-0516 on OLED: Microwave Motion (Radar)

What it is: The RCWL-0516 is a Doppler microwave motion sensor. Unlike a PIR it doesn't need line of sight — i…

read tutorial →
Sensors

MPU6050 on OLED: Accelerometer & Gyro

What it is: The MPU6050 is a 6-axis motion sensor: a 3-axis accelerometer plus a 3-axis gyroscope in one chip.…

read tutorial →
Sensors

MPU9250 on OLED: 9-Axis IMU

What it is: The MPU9250 is a 9-axis IMU — accelerometer, gyroscope AND magnetometer. The added magnetometer le…

read tutorial →
Sensors

ADXL345 on OLED: 3-Axis Accelerometer

What it is: The ADXL345 is a small, low-power 3-axis accelerometer with excellent resolution. It's ideal for t…

read tutorial →
Sensors

QMC5883L on OLED: Digital Compass

What it is: The QMC5883L is a 3-axis magnetometer that senses the Earth's magnetic field, so you can compute a…

read tutorial →
Sensors

KY-040 on OLED: Rotary Encoder Counter

What it is: The KY-040 is a rotary encoder — a knob you can turn endlessly in either direction, plus a built-i…

read tutorial →
Sensors

A3144 Hall Sensor on OLED: Magnet Detection

What it is: The A3144 is a digital Hall-effect sensor that switches when a magnet is near. It's used for RPM/s…

read tutorial →
Sensors

SW-420 on OLED: Vibration & Shock

What it is: The SW-420 is a vibration sensor module — a spring-loaded switch that opens and closes when shaken…

read tutorial →
Sensors

SW-520D on OLED: Tilt Detection

What it is: The SW-520D is a ball tilt switch — a tiny tube with a rolling ball that closes two contacts when …

read tutorial →
Sensors

VL53L0X on OLED: Laser Time-of-Flight Distance

What it is: The VL53L0X measures distance with a tiny invisible laser, timing how long light takes to bounce b…

read tutorial →
Sensors

Sharp GP2Y0A21 on OLED: IR Distance

What it is: The Sharp GP2Y0A21YK0F is an analog infrared distance sensor with a 10–80 cm range. It uses triang…

read tutorial →
Sensors

TTP223 on OLED: Capacitive Touch Button

What it is: The TTP223 is a capacitive touch button — a solid-state replacement for a mechanical push button. …

read tutorial →
Sensors

KY-038 on OLED: Sound Level Meter

What it is: The KY-038 (and near-identical KY-037) is a microphone module with an amplifier. Its analog output…

read tutorial →
Sensors

MAX9814 on OLED: Microphone with Auto-Gain

What it is: The MAX9814 is an electret microphone amplifier with automatic gain control (AGC) — it boosts quie…

read tutorial →
Sensors

Soil Moisture on OLED: Capacitive Sensor

What it is: A capacitive soil-moisture sensor measures how wet soil is by sensing its dielectric constant. Bec…

read tutorial →
Sensors

Rain Sensor FC-37 on OLED: Rain Detection

What it is: The FC-37 rain sensor is a comb-shaped board that detects water drops landing across its tracks. P…

read tutorial →
Sensors

Water Level Sensor on OLED: Depth

What it is: This is the common "stair-step" water-level sensor — a set of interleaved traces whose exposed len…

read tutorial →
Sensors

ACS712 on OLED: Current Sensor

What it is: The ACS712 measures DC (or AC) current using the Hall effect, with full electrical isolation betwe…

read tutorial →
Sensors

INA219 on OLED: Current, Voltage & Power

What it is: The INA219 is a digital power monitor. It measures bus voltage, current (through a built-in shunt)…

read tutorial →