-
Notifications
You must be signed in to change notification settings - Fork 171
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
make startup delay optional #1
Comments
That is what LCD datasheet tells, unfortunately. They are not very fast devices to startup, though some of them do allow you to shorten the delay to 20-30ms as opposed to standard 40. Still this delay is mandatory after you switched on the power on the display, if you remove it - garbage happens sporadically and lcd ends up in misconfigured mode. What ESP type are you using? Can you show bit of your code? |
I do not have a code example, pretty sure I was just using the examples, regardless of what the datasheet says, Using esp 12e, nodemcu, adafruit huzzah, I just unwired my lcd, using i2c lib now, so cannot retest atm. |
Sounds like catch22 to me. i2c is a good solution, my LCD is a standard one and does not support i2c С уважением, 2016-05-21 15:47 GMT+03:00 Shawn A notifications@github.com:
|
At least change to delay(50)( delay is not blocking ), but even then , i can handle startup delays in my own code, if i already have 1000ms delays for wifi I do not need another 50ms kicking around in a lib beyond my control. I remove the line entirely for my use, hence the add an option. 50ms is a long time when it might not be necessary for all modules, and it is beyond your control when it is inside a library, hence the request for some option to disable or global to modify. |
Does changing to delay(50) works for you? |
The reason I am asking - my LCD refuses to work if I change delayMicroseconds(50000) to delay(50)... |
interesting, ill try to test when i get a chance, i just removed it entirely, so I am not sure. |
Surprisingly enough, it does work with 'lazy' setup. Say, if you postpone the LCD initialization till at least setup(). Like that:
I even went ahead and tried it with yield() based wait function like this: |
delayMicroseconds(50000);
is blocking on esp8266, prevents some wifi routines and can trigger watchdog also, and probably not needed for most instances anyway.The text was updated successfully, but these errors were encountered: