Skip to content
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

Cannot use ESP32 S3 GPIO 43, 44 for OneWire Dallas DS18B20 due to setting in util file #131

Open
teastainGit opened this issue Sep 20, 2023 · 6 comments

Comments

@teastainGit
Copy link

teastainGit commented Sep 20, 2023

Arduino IDE 2.2.1 all libraries updated to current available.
Attempting to run a DS18B20 Dallas Semiconductor temp sensor on the "I2C" JST connector of a LilyGO T-Display S3.
The reading was -127 when I tried either pin 43 or pin 44.
Pins 1, 2, 18 or 17 worked fine.
Sensor would not work on 43, 44 on a M5StampS3, but would on any other.
Contributors to the Espressif Arduino repository
espressif/arduino-esp32#8324 (comment)
finally after 4 months hit on the possibility of the library's Util file OneWire_direct_gpio.h line 200; limiting the pin count to 33, the remainders would be "inputs".
I edited the util header and it worked.
Should I make a Pull Request?
-Terry

@Jason2866
Copy link
Contributor

Jason2866 commented Oct 2, 2023

Imho a new release should include the needed changes for the upcoming espressif32 Arduino 3.0 too. We use a modified forked version and did the changes. Since it is not based on the current version, the changes done needs to be ported to the version here.
The modified working for core 2.0.x and 3.0.x (support for 1.0.x is dropped) is here
https://github.com/arendst/Tasmota/tree/development/lib/lib_basic/OneWire-Stickbreaker
Anyone feel free to do the PR

@369Martin369
Copy link

369Martin369 commented Jan 20, 2024

Arduino IDE 2.2.1 all libraries updated to current available. Attempting to run a DS18B20 Dallas Semiconductor temp sensor on the "I2C" JST connector of a LilyGO T-Display S3. The reading was -127 when I tried either pin 43 or pin 44. Pins 1, 2, 18 or 17 worked fine. Sensor would not work on 43, 44 on a M5StampS3, but would on any other. Contributors to the Espressif Arduino repository espressif/arduino-esp32#8324 (comment) finally after 4 months hit on the possibility of the library's Util file OneWire_direct_gpio.h line 200; limiting the pin count to 33, the remainders would be "inputs". I edited the util header and it worked. Should I make a Pull Request? -Terry

@teastainGit, what exactly did you edit? Line 200 set to 44 does not work...?!? help please

@teastainGit
Copy link
Author

Martin:
Well, I just set it to 44 as a local, ad-hoc edit, as the simplest solution, but that line NOW in the github repository says:
if ( digitalPinIsValid(pin) && pin <= NUM_DIGITAL_PINS ) // pins above 33 can be only inputs
My libraries are up-to-date and the sensor works on pin44, as I write.
Hope this helps.
-Terry

@369Martin369
Copy link

369Martin369 commented Jan 20, 2024

Thanks. meanwhile I used the patched version from Tasmota https://github.com/arendst/Tasmota/tree/development/lib/lib_basic/OneWire-Stickbreaker
and it works now :-) Thanks

PS: and it works with only internal pullup ( pinMode(43,INPUT_PULLUP);)

@patofoto
Copy link

Have tried everything in this thread and also this:

#141

No luck yet. Is there any other library that might allow me to read PIN 43?. I need to use the JST connector.

@uzi18
Copy link

uzi18 commented Jun 14, 2024

@patofoto this one supports pins >32 https://github.com/pstolarz/OneWireNg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants