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
I2C issue while reading from HTU21DF #399
Comments
I think I2C bug WAS resolved by this commit eb95d30 What version of Sming do you use? Try to update to latest release. If issue remains - feel free to ask for help here! |
I have the same issue with a BMP180 - returns only zeros. |
BMP 180 works ok on Esp12 end esp01 , I am using develop version of Sming (2 weeks old). |
@avr39-ripe I think i am using an older build as you suspected, I will give it a try tonight with eb95d30 and will let you know of the results. |
I tried with the latest build( afe5393 ) Issue still persists. I dont have a DSO or a scope to see exactly whats going on but a friend of mine has a Logic analyzer will borrow that and check what might be going wrong. Thanks again for the help :) |
One more thought: may be you use wrong I2C pins? Are you sure, that you connect your device to right pins? Try to specify pins directly before Wire.begin() in init() syntax is void pins(int pinSCL, int pinSDA); // Can be called only before begin(): Wire.pins(0, 2);
Wire.begin(); |
I also still have the problem. BMP180 works with Arduino dode. Smite BMP180 example with newest version is not working. Im using the correct pins, also tried "Wire.pins(0,2)" and a lot of other stuff. I dont get whats wrong. I only get zeros what-ever I do. Increased the delay between pulling up the lines and starting the transmisson. No difference. |
@comino by "Arduino code" you mean real AVR-based arduino+its code, or esp8266-based Arduino software platform? |
Try:
Maybe You switched ports ?? 0 <-> 2 |
ESP8266 WROOM-2 + Arduino + same board its working. Checked several times if BMP still works on adurino - works perfect. So the hardware should be fine. Tried what you menitoned @flexiti but still no success. But since its working for you guys, the problem must either be on my computer or sitting in front of it and not in Sming ;).Im just armed myself with a oscilloscope. If I find the error and its relevant for the community I will share. Thanks for your support. |
Here is my complete initialization sequence. Maybe, not everything is needed, but it is working fine for me. I am using the default pins. In this case, remember to remove the "flash enable" jumper after flashing - at least on ESP-12 it shares the SCL pin of he I2C-bus.
|
I personally think that grab the SPI and I2C implementation from the Arduino ESP8266 project would be best way how to fix a lot of issues in quite small time, they will fix issues instead of us. Arduiono ESP8266 project has much more programmers on the project. But I personally like network API on Sming much more, so I hope that Sming doesn't die. |
@comino I tried the BMP180, and it seems to work, the issue might be in the HTU21DF Adafruit library(i suspect the delay and timing function maybe), The HTU21DF works fine with Arduino for the ESP8266, just not with sming. |
Bmp180 example working fine for me but I can't read data from attiny85 on i2cbus too. |
closed due to low activity |
i was trying to read the HTU21DF using the Adafruit library (https://github.com/adafruit/Adafruit_HTU21DF_Library) the 'begin' function works and the chip is detected, but the data requested using the Wire.requestFrom() doesnt seem to work and returns zero bytes, also Wire.Available() doesn't seem to work and returns zero. are there any work arounds? I would be glad to contribute to help solve this issue, pointers appreciated!
The text was updated successfully, but these errors were encountered: