You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the library I notice that the readings are jumpy, the value jumps between the actual reading and one of a number of predictable values. These are 0.00, 16.0625, 32.125, 48.1875, 64.25, and so on. There is a clear pattern. If these values are omitted using an if statement I get a super smooth clean reading. If they are not ommited then the values will always jump back and forth between the actual value and the nearest of the pattern values. Not sure if its a hardware problem or a software problem, but Its worth investigating.
Your workbench
What development board or microcontroller are you using? ESP32
What version of hardware or breakout board are you using? CJMCU-96
How is the breakout board wired to your microcontroller? normal I2C, there is also a DS1307 RTC on the bus
How is everything being powered? USB
Are there any additional details that may help us help you? I have removed additional pullups, so there is only one pair of 10k pullups on the BUS. When other breakouts are connected to the BUS they work normally.
Expected behavior
The readings should be smooth and not jumpy. At the very least, if these problems are not limited to me, these values should be somehow discarded behind the scenes inside the library.
Actual behavior
Explained above.
Additional info
The bug is also present in readings from the ambient sensor inside the chip
I would assume a hardware problem or interference if there was no pattern, there is however a very precise pattern, which makes me think software issue
Here is my code showing how I eliminate the faulty readings
Subject of the issue
When using the library I notice that the readings are jumpy, the value jumps between the actual reading and one of a number of predictable values. These are 0.00, 16.0625, 32.125, 48.1875, 64.25, and so on. There is a clear pattern. If these values are omitted using an if statement I get a super smooth clean reading. If they are not ommited then the values will always jump back and forth between the actual value and the nearest of the pattern values. Not sure if its a hardware problem or a software problem, but Its worth investigating.
Your workbench
Expected behavior
The readings should be smooth and not jumpy. At the very least, if these problems are not limited to me, these values should be somehow discarded behind the scenes inside the library.
Actual behavior
Explained above.
Additional info