ESP32: measure ambient light with the BH1750 lux sensor
Wire a BH1750 to an ESP32 over I2C and get real lux readings instead of a raw ADC number. The light sensor that works out of the box.
Tag
13 tutorials
Wire a BH1750 to an ESP32 over I2C and get real lux readings instead of a raw ADC number. The light sensor that works out of the box.
The ESP32 ADC is noisy and 12-bit. The ADS1115 gives you 16-bit, 4-channel, differential readings over I2C for $4.
Give your Arduino a real clock with the DS3231 RTC module. Set the time, read it back, and fire alarms that survive power loss, drift, and reboot.
Plug a Sense HAT onto a Raspberry Pi and read temperature, humidity, pressure, and orientation from Python, drive the LED matrix, and fix the two traps every owner hits.
When the Serial.print tells you nothing, the I2C bus tells you everything. Pick a $10 clone or a $400 Saleae, install Sigrok and PulseView, decode I2C/SPI/UART.
Wire a BH1750 light sensor to an ESP32 and measure ambient light in real lux units. The right sensor for daylight sensing, plant monitoring, and screen brightness.
Wire a BME280 to an ESP32 over I2C and stream temperature, humidity, and barometric pressure. Better than the DHT22 for anything weather-related.
Wire an MPU6050 to an ESP32 and read acceleration and rotation rate in three axes. The sensor you need for robots, drones, and motion tracking.
Wire a 128x64 OLED display (SSD1306) to an ESP32 and draw text, graphics, and sensor graphs. Smaller and brighter than the 16x2 LCD.
Wire a 16x2 character LCD (HD44780 with the PCF8574 I2C backpack) to an ESP32 and show text. The right display for showing sensor readings and menus.
Run out of GPIO on your ESP32? The MCP23017 adds 16 GPIO pins over I2C using only 2 wires. Multi-platform code for ESP32, Arduino, Pico, and Pi.
Add a 16x2 character LCD to your Arduino using the I2C backpack. Show text, custom characters, and read sensor values on a screen.
I2C is the two-wire protocol that connects most Arduino sensors. This tutorial covers the wiring, the address scan, and the most common gotchas.