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

more stability for ESP8266 #113

Merged
merged 3 commits into from
Jan 21, 2019
Merged

Conversation

el3ctrician
Copy link
Contributor

in case of esp8266, calling the begin in constructor causing the esp to crash see this issue and this also

added some illustration example also and a keywords file

@amotl
Copy link
Contributor

amotl commented Jan 21, 2019

Hi @bogde,

parts of the changes submitted by @el3ctrician look like they are related to #29 and the corresponding part of the documentation

See the example in examples/HX711SerialBegin. Please don't use examples/HX711Serial anymore. It is deprecated because the pin definition within the constructor is not timing safe. (#29)

I would recommend removing the non-timing-safe variant completely from the code as it keeps on popping up here, especially as the ESP MCUs are gaining more and more popularity, which leads to different attempts in solving the crashes experienced there. See also #76 and maybe others.

Thanks,
Andreas.

@bogde bogde merged commit a4ba678 into bogde:master Jan 21, 2019
@bogde
Copy link
Owner

bogde commented Jan 21, 2019

Commit was merged. Thank you!

@amotl
Copy link
Contributor

amotl commented Jan 21, 2019

Hi @bogde,

that was quick, thanks for merging this!

However, I really would aim at finally removing the problematic constructor altogether and especially would amend the ESP8266 example accordingly.

While I recognize that the initialization call to HX711 scale(D2, D3); in this very example is being masked by respective #ifndef ESP8266 guards (https://github.com/bogde/HX711/blob/77863aa3/HX711.cpp#L13-L15), I still feel this could be misleading and a potential source for errors.

May we humbly ask whether you would accept a respective pull request from us also emphasizing the breaking change in the documentation appropriately? It would be a kind of an early spring cleanup maybe ;].

Thanks,
Andreas.

@bogde
Copy link
Owner

bogde commented Jan 22, 2019

sure, i'm totally fine with that!

@el3ctrician
Copy link
Contributor Author

@amotl @bogde if you need any help am avilable to work on it during the weekends. Just let me know

@amotl
Copy link
Contributor

amotl commented Jan 23, 2019

Dear Ahmad,

thanks already!

Assuming you might exactly know what we are talking about, I would be very happy if you would take this as I will be traveling on the weekend. Just was rambling around here to check whether @bogde would even consider this change.

Background

In the advent of modern libraries for reading the HX711 ADC (which we are also interested in), I really would like to give the well known HX711 library by @bogde here some love as it is still the canonical place to go when reading the HX711 ADC and has a huge audience already.

While we successfully run this library on ESP8266 MCUs already, I would especially like to go into checking compatibility with the ESP32 in the long run. So I thought about bringing this topic up here.

So, if you would like to spend some time on this library, we would appreciate this very much, @el3ctrician.

With kind regards,
Andreas.

@amotl
Copy link
Contributor

amotl commented Jan 24, 2019

Dear Ahmad,

while being at it, may I humbly ask you to make the busy loops around the code safe for ESP usage by properly feeding the watchdog? Issues like #120 and friends also seem to come up here frequently.

Thanks in advance,
Andreas.

@amotl
Copy link
Contributor

amotl commented Feb 16, 2019

Hi Bogdan and Ahmad,

just wanted to let you know that we managed to make a start in the dry dock [1] (branch "spring-cleaning") by pulling in various pieces from the issue tracker of this library as well as a fork supporting ESP32 already (https://github.com/lemio/HX711/).

We will follow up letting you know whether this will actually compile (we didn't do yet) and if it will actually work on real hardware (unfortunately, we don't own any ;]).

Edit: Code compiles now and in order not to spam this further, I've diverted a future discussion to #123.

With kind regards,
Andreas.

P.S.: For the records, we are also tracking this at [2].

[1] https://github.com/hiveeyes/HX711/tree/spring-cleaning
[2] https://community.hiveeyes.org/t/using-bogdans-canonical-hx711-library-on-the-esp32/539

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

Successfully merging this pull request may close these issues.

3 participants