Skip to content

Always show "-127" on OLED. #276

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

Open
mianqi2016 opened this issue Apr 1, 2025 · 2 comments
Open

Always show "-127" on OLED. #276

mianqi2016 opened this issue Apr 1, 2025 · 2 comments

Comments

@mianqi2016
Copy link

I test this library on Arduino Nano, when I connected the data pin of DS18B20 to A7(D21), it would show "-127" in Serial Monitor by "Serial.print();", when changed A7 to D4, the showing is correct. When I want to print the temperature on OLED by "oled.print();" from this library, it always show "-127" either D21 or D4, D5, A0 ... why?

@LRDPRDX
Copy link

LRDPRDX commented May 3, 2025

Could you please provide the full code of your sketch when you get the "-127" when connected to D21. This value means your sensor is not connected. And more over from the documentation https://docs.arduino.cc/language-reference/en/functions/digital-io/digitalwrite/#_notes_and_warnings:

The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini’s A6 and A7 pins, which can only be used as analog inputs.

@popos123
Copy link

popos123 commented May 7, 2025

As above, You need to provide the full code to the e.g. pastebin, it could be the problem with timing.
The problem with pin naming i have the same on STM32F401, the name "PB12" is working perfect, but "PB_12" is not.

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

3 participants