-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waterelf32 Wire.begin not using correct pins #17
Comments
Fork of arduino-esp32 that may be related to this issue (I have not looked into it thoroughly). |
The SDA and SCL pins are flexible - but seem to be defined correctly for the esp32 Feather we're using in .../Arduino/hardware/espressif/esp32/variants/feather_esp32/pins_arduino.h |
Also please either assign yourself to this one - or let me know if you are already too busy and I'll take it - it's important enough that I'd like one of us to look at it asap. |
I would like to prioritise issue #8. A more modular codebase would hopefully make fixing these types of issues easier in the future. |
That makes sense, and we can work around the bug in the I2C system by various means (ugliest would be to reboot when it goes south...) |
As this issue is more about fundamental bugs in I2C subsystem than wrong pin definitions, I'm going to close it for now, we can open a new one to track the I2C bug if needed. |
Problem
The pins for SDA and SCL on the esp32 are 23 and 22. Calling
Wire.begin
with no args seems to use incorrect pins for the esp32. This results in the TSL2591 never being found instartPeripherals
:fishy-wifi/ardesp/waterelf32/waterelf32.ino
Lines 832 to 835 in c7e3cb4
Furthermore the Adafruit_TSL2591_Library's function
tsl.begin()
callsWire.begin
with no args, making it incompatible with the esp32.Example
Running the example tsl2591.ino results in:
Possible Fix
Replacing all
Wire.begin()
withWire.begin(23, 22)
in Adafruit_TSL2591_Library and waterelf32.ino.After applying fix, tsl2591.ino can be run with the ESP32.
Problems with 'Fix'
After applying the fix the waterelf32.ino reports errors with addresses 20 and 29 being busy.
Example waterelf32 output after applying 'fix'
The text was updated successfully, but these errors were encountered: