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

not working if esp8266 platform lib is >=3.0 #4

Open
burnbabyburn opened this issue Oct 15, 2021 · 2 comments
Open

not working if esp8266 platform lib is >=3.0 #4

burnbabyburn opened this issue Oct 15, 2021 · 2 comments

Comments

@burnbabyburn
Copy link

burnbabyburn commented Oct 15, 2021

Hey there,
thanks for sharing your work. I liked your solution very well and connected an 12V AUB0912VH Fan and flashed an esp8266

Sadly it doesn't matter what speed i set in the webinterface. The fan keeps spinning as if it's always set to 0% speed. I didn't connect a NTC thermistor though, as it should just matter when using temp control. To double check i also enabled simulation_mode temporary, which didn't help either.

I checked the wiring by inserting this loop in the setup() (before analogWriteRange and analogWriteFreq are set)
pinMode(0, OUTPUT);
for (int i = 5; i <= 255; i+=5) {
analogWrite(0, i);
delay(1000);
Serial.println(i);
}
which controls the fan just fine. I tried half the day to find the error in the code, but i don't get it. Maybe you read this and are willing to help :)
TIA


i just flashed your binary(ESPPWMFanControl.1.0beta2.d1_mini.bin), which works fine. As i want to add support for AM2320, it would be nice if we could compile. I try downgrading the other libs now.

SOLUTION: ESP Board/platform library <3.0.0 (16.5.2021) did the trick for me

@burnbabyburn burnbabyburn changed the title Fan speed control not working not working if esp8266 platform lib is >=3.0 Oct 15, 2021
@faeibson
Copy link
Owner

Hi,
thanks for your comments. I haven't been working on this project in the last months and, obviously and unfortunately, it all doesn't quite work out anymore.

However, I have already been thinking that the best way to cope with all these issues would be to do a complete rewrite. Anyway, as I have to admit, the code isn't written very well, there are lots of things to improve and just have to be implemented better to also be able to easily expand the functionalities such as implementing new sensors and stuff. This project started as one of those "quick and dirty sunday spaghetti code projects" to just get things running and then I decided, regardless of the code quality, it would be nice to publish and share it with others. Yet, as of today, this doesn't help much.

Nonetheless, I'm glad it is working now for you with the older libs! I hope you will be patient, as I really can't tell when I will rework it. I can assure you that I really don't want to let this project die, yet I don't want to upload crap but provide a great solution - finally. :)

burnbabyburn added a commit to burnbabyburn/ESPPWMFanControl that referenced this issue Oct 17, 2021
Temporary fix to compile working code.
brzo_i2c has a bug in 1.3.3 - See issue faeibson#3 
ESP8266 platform has breaking changes in Versions >= 3.0.0 so use one below this version faeibson#4
@burnbabyburn
Copy link
Author

burnbabyburn commented Oct 17, 2021

Hi Fabian,

thanks for your response! I think the main problem is a breaking change with the newer platform library for ESP8266. Since 3.0 they ship an i2c lib now, so we could replace brzo_i2c.
Don't be so hard with yourself. IMHO the code quality is pretty fine (and much better than i would do it on an evening), in my case the arduino IDE with it's limited capabilities is more of a problem to debug errors. Not writing C++ in like 10 years didn't help much too ^^
It's also rather simple to add new sensors, as all temp readings are returned by one function. I am very glad i didn't have to deal with all the webserver, storage and wifi stuff !!!

Hopefully i can throw some time at it and provide a pull request to contribute.
Thanks again for sharing your work. Looking forward for future commits 👍

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

2 participants