Comments on: ESP32 with APDS9960 Proximity, Light, RGB, and Gesture Sensor (Arduino IDE) https://randomnerdtutorials.com/esp32-apds9960-sensor-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sat, 12 Jul 2025 07:44:44 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Patrick https://randomnerdtutorials.com/esp32-apds9960-sensor-arduino/#comment-1067987 Sat, 12 Jul 2025 07:44:44 +0000 https://randomnerdtutorials.com/?p=169853#comment-1067987 Thanks for this tutorial 🙂

For those interested, details below show how to detect I2C device with ESP32S3 (and not with ESP32 as described in tutorial).

Best Regards

ESP32S3

To detect I2C device with ESP32S3, SDA and SCL connections have to be changed on breadboard.

For ESP32S3, default SDA and SCL pins are respectively 8 and 9, as described below :
// s3 pins_arduino.h (standard) static const uint8_t SDA = 8; static const uint8_t SCL = 9;
// Wire(): creates an I2C bus on the SDA and SCL espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/tutorials/io_mux.html

while default SDA and SCL pins are respectively 21 and 22 for ESP32.

With correct SDA and SCL wiring for ESP32S3 (default 8 9), I2C device is detected :

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
[ 97][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
Starting I2C Scanner and Chip ID Reader
[ 1122][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=8 scl=9 freq=100000
Scanning I2C bus…
I2C device found at address 0x39 – Chip ID: 0x9E
Scan complete.

It is also possible to assign other pins than default ones to SDA and SCL, for instance 40 and 41, by defining pins explicitly in code :
static const uint8_t SDA_PIN = 40; // default 8
static const uint8_t SCL_PIN = 41; // default 9

Of course, connections have also to be changed on breadboard to match explicit pins definition

]]>
By: Malisa https://randomnerdtutorials.com/esp32-apds9960-sensor-arduino/#comment-1066219 Tue, 08 Jul 2025 01:57:16 +0000 https://randomnerdtutorials.com/?p=169853#comment-1066219 Hi, I’m trying to integrate the APDS9960 gesture sensor with a WS2815 addressable LED strip using the ESP32. After following your APDS9960 tutorial and combining it with this guide on WS2815 wiring and control (suntechlite.com/how-to-wire-and-code-ws2815-led-strips-on-esp32/), I ran into issues where gestures aren’t reliably triggering LED patterns. Could you suggest best practices or wiring precautions for using both I2C sensors and high-current LED strips on the same ESP32? Could voltage fluctuations or timing conflicts be a factor?

]]>
By: bill Valvik https://randomnerdtutorials.com/esp32-apds9960-sensor-arduino/#comment-1061250 Thu, 26 Jun 2025 18:21:08 +0000 https://randomnerdtutorials.com/?p=169853#comment-1061250 This gives me so many ideas on how to implement this in my house. I was thinking of combining this with MQT to run some automations in my house.

Have you given any thought on how to put the ESP-32 board and this sensor into a useful box that could be stuck to a wall or near a light switch. I have seen a module that you can put into an outlet that will power a 5v device while still using the main function of the outlet for the shore power.

I am not much of a 3d printer yet, but I need to overcome that hurdle soon.

]]>