r/esp8266

SP8266 I2C bus freezing

Hi everyone, I'm currently using a DIY weather station with an ESP8266 WeMos D1. For some time now, I've been having problems with the I2C bus freezing, which forces me to reboot the device, cycle power, and reconnect power to get the sensors working again—sometimes once a day.

Following some advice, I added two 2.2 kΩ pull-up resistors between the 3.3 V pin and the SDA/SCL lines. This seems to have solved the freezing issue; for now, it seems to have been working stably for a full day!

However, I've noticed a side effect: the readings from my TSL2591 ambient light sensor have halved compared to what I was getting before.

I have two questions:

Are there better ways to resolve these I2C bus freezing issues, or is adding external pull-up resistors the standard solution for the ESP8266?

Should I simply compensate for the "offset" in my code, or does the variation in values ​​indicate a deeper issue with the I2C signal integrity caused by the resistors?

Currently, the ESP8266 reads temperature with an SHT40, wind direction with an AS5600 and a 10-meter cable, and light with a TSL2591. This and the SHT40 use two 2-meter cables. (I should join the two sensors to use a single cable, but I hadn't thought of that before installing them.) I added a 470 microF capacitor just to be safe.

Any advice or suggestions on best practices would be greatly appreciated. Thanks!

reddit.com
u/GianlucaBelgrado — 4 days ago
▲ 14 r/esp8266

Need help with PID tuning on my custom ESP8266 + MPU6050 drone flight controller

Hi everyone, I am an electronics student currently building a custom quadcopter flight controller from scratch using an ESP8266 and MPU6050 (via I2C).

​I am having a hard time getting the right PID values to stabilize the drone. It either oscillates too violently (shakes) or reacts too slowly and drifts away.

​Here is my current setup and codebase:

​Microcontroller: ESP8266 (programmed via Arduino IDE)

​IMU: MPU6050

​My GitHub Repo (for the full code): https://github.com/exstain/Custom-Drone-Flight-Controller

​The Problem:

Whenever I increase the P (Proportional) gain, the drone shakes violently. But if I lower it, it doesn't correct itself fast enough. Since ESP8266 is a single-core processor, I am also worried that my loop time/cycle time might be affecting the PID calculations.

​Any advice on how to properly tune the PID values or optimize the loop time for an ESP8266 drone would be highly appreciated. Thank you so much!

u/Faldiano_R — 4 days ago
▲ 175 r/esp8266+2 crossposts

codelight — Claude Code status display

Custom firmware for the GeekMagic Ultra that turns it into a live Claude Code dashboard. A companion Python script on your computer polls usage and session state and pushes it to the device over WiFi.

https://github.com/henrikekblad/codelight

The code is "ready". But as the disclaimer on github says, I managed to rip the screen cable when doing the final tests.

u/mysensors — 9 days ago
▲ 15 r/esp8266

My first ever esp8266 "rover" with camera. (Yes its a box with wheels)

u/abneytel — 6 days ago

Local database gateway for esp8266

Hello, I've created a mini gateway for ESP. The problem was that it required a database for data flow, and this came about while I was trying to figure out how to solve that. I don't know how it will perform with more devices and tasks, but I think customizable dashboards can be created for mobile, PC, and web applications, just like SCADA. I'll leave it like this for now and then install the server on Respara Pi.

I also plan to add this system to this application.

https://play.google.com/store/apps/details?id=com.redant.buttonfi

What do you think?

example SCADA Gemini

u/Dry_Engineer194 — 8 days ago