onInit with HD44780 #897
Replies: 9 comments
-
Posted at 2016-11-14 by DrAzzy The display may need a moment to I utilize itself, try waiting a second or two before you try to use it (by putting the initialization code in a setTimeout() |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-14 by ChristianW Sorry, no. Tried this before.
I even use the very same LCD in an Arduino project and can start sending to it right away with no issues there. Any other idea? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-14 by ClearMemory041063 Suggest trying I2C.setup and require lines before the settimeout. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-15 by @allObjects The () HD44780.js module, lines 28 under '//initialise'. The *** Initializing by Instruction** section in HD4480 Datasheet - on pages 45 and 46 - talks about timings when initialization instructions are sent... (datasheet pdf doc linked below). The times before the initialization instructions may not need to be taken into account, because proper power should have been stable before first JS code is reached. Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-15 by @gfwilliams B6 and B7 on the Pico are pins used for Serial1 - which is where the console moves by default. I guess that might be affecting things - while they shouldn't transmit anything for ~1 second after startup (by which time you changed the pins around anyway), I guess it's possible that their startup values confuse I2C on the display and it needs a timeout to recover. I'd hope that the following - as suggested above - might work:
But the other option is just to use some different pins - it's bad luck - those two are literally the only ones on the board that get used for something else by default :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-16 by ChristianW Gordon, it seems the pins caused it.
No delay needed. Just different pins. Thanks for the hint. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-16 by luwar I had a similar problem with an infrared temperature sensor a few month ago - sadly without finding the bug: http://forum.espruino.com/conversations/280634/#comment12743705 @christianw For completeness: I have a lot of (>10) different I2C devices which work on I2C1 without any problem. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-16 by ChristianW @luwar |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-17 by luwar Thank you. So I know that my problem with the MLX90614 has obiously a different cause. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-14 by ChristianW
Beginner with espruino and having some trouble with onInit on my Pico:
Upload and save() works as expected:
But when I un- and re-plug USB it's not working - the LCD is staying blank:
Just manually executing load() again and voila - the LCD shows "Hello World!"
What's going wrong?
Beta Was this translation helpful? Give feedback.
All reactions