-
Notifications
You must be signed in to change notification settings - Fork 108
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
Hello, the library dont really want to work with my esp32s, anyone? #56
Comments
btw my it gives me error: [BH1750] ERROR: received NACK on transmit of address |
the board is NodeMCU ESP32S |
try with |
@goebish nope aint working |
still same error, just ERROR: received NACK on transmit of address |
Have you tried to add pull up resistors between SDA<->3.3V and SCL<->3.3V ? |
nope dont have another ic2 device, and dont think i got a pull up resister, |
but im pretty sure there is no need for a pull up resistor |
just use any 1k-30k resistors, that should be fine, you need 2 |
so a resistor between D21 -> SDA and D22 -> SCL ? |
why should a resistor change anything? just asking :D |
no, between SDA -> 3.3V & SCL -> 3.3V |
because i2c lines need to be pulled up |
not sure what you mean, there is no between SDA and 3.3v i think |
well, just connect a 10k or so resistor between +3.3V and SDA ... same for SCL |
im trying to say, i connect direct from the board to scl, there is no connection to 3v between i can interact with |
i have a 3v pin ofc, but i sounds weird if i should hook the up to them |
btw the blue line is ground and the red is 3.3v |
yes, just connect this 3.3V line to SDA through a resistor ... same for SCL, don't change anything else |
lul ok, |
don't worry, you can't get the magic smoke out just by adding pull up resistors ;) |
hmmm it didnt work just hooking 3.3v onto scl and sda |
without resister tho |
... don't do that, that could damage the esp! |
oh something changed, when i unplug both 3.3v it says ERORR: received NACK on transmit of address |
get same result, when im using 0x23 and 0x5c |
At least that seems better with the pull up resistors, but I don't understand why you get an error on transmit of data then, the library is only using standard Arduino lib commands, nothing specific to a platform. |
ok, i just tryed running i2cdetect, while have connected the 3.3v's, and it just give a billion errors per mili second, so i guess i need a resistor |
There's something I don't understand, are you connecting scl & sda directly to +3.3V ? |
just tryed with a resistor on both with the strength of 15 Ω * 10^5 |
just got the error with the address |
Use resistors between 1k and 30kΩ, not 150kΩ or 1.5MΩ, are you reading my messages? |
yep |
oh sorry did just catch the 1k - 30k / i forgot it |
Did you solder the pins to the boards or do you just push it through? Solder it and check the resistance with a multimeter. If you solder the pins as seen in the picture then it is wrong. (The board itself contains usually the needed pullup resistors)
|
Yea the pins is soldered, but the board is a esp32, I have a esp8266, but I need it to work on esp32 |
I'm aware of your board, but I want to know whether the sensor works with another board. |
hmm, which address are you using? |
The default one (0x23). I use the lolin32lite, Pin 22 and 21 for i2c. |
ye i use pin 22 and pin 21 to, have tryed both 0x23 and 0x5C |
To sum it up. Your wiring, your board, your sensor. Not the library. |
hm ok |
so something is wrong with the wirering? |
I think so.
|
i use the latest arduinoIDE, im not sure what the power rail is, what do you mean with soldered to the wrong side? |
|
You may need to pull up the SDA and SCL before Wire.begin(SDA, SCL); And make sure the BH1750 is...physically connected. I hit the same error when my sensor looses the pin contact. |
my code:
The cabling:
D21 -> SDA
D22 -> SCL
GND & ADDR -> gnd
VCC -> 3.3V
The text was updated successfully, but these errors were encountered: