Pixl LCD initialisation and output #3169
Replies: 22 comments
-
|
Posted at 2019-10-31 by Robin Wed 2019.10.30 Welcome back from your respite @christianw Is there a tutorial being used that will assist us to follow along? Link please. I will defer to others, but until they respond, is that output intentional or is it a possible error being reported?
Beneath heading 'LCD Screen' "Any errors generated when there is no connection will also be displayed on the LCD." Are there any Espruino commands that are outside functions, that would be executed on upload, before the E.on('init') fires?
> http://www.espruino.com/Reference#l_E_init
From tutorial below heading 'Tutorials', use of also from same link below heading 'Graphics' What about clearing an off screen area, then flip that into view? |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by @MaBecker Take a look into jswrap_pixljs.c |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by ChristianW Thanks @MaBecker for the link. is causing the output after initialization just before I do the g.clear() and g.flip(). The function also seems to contain some button magic like self test that would be missing if skipped altogether... |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by ChristianW @robin thanks for your reply. My code is still in early stages. Advertising a CSC and battery service already works as far as I can check with NRF toolbox on my phone. The output is the lines "Bluetooth" being written to the LCD when a BLE central (phone or laptop) connects or disconnects like you can see here: https://youtu.be/pawHDr4i3jI?t=126 But it still seems to happen with my code running and somehow interferes with my "g" screen outputs. It will disappear on the next update interval with g.clear() and g.flip() but you will notice it as a flicker sometimes. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by @MaBecker Yep, custom firmware. Maybe a define in the board file to exclude the sections and some ifdef in the function. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by AkosLukacs To avoid Bluetooth connection writing to the screen, just call |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-10-31 by ChristianW @AkosLukacs - ah. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-01 by @gfwilliams Wow, yeah - custom firmware seems like overkill :) The If it was a real problem for you I could probably modify the firmware to have a flag that disabled that behaviour though - this is the first time it's come up. However it seems the real issue here is the text that appears on connect/disconnect? That's just as @AkosLukacs said - the REPL goes to the LCD by default, and ... it's work leaving on the LCD for development purposes though - if your code causes some kind of error then you'll get a stack trace on the screen, which can save you a lot of trouble! |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-01 by ChristianW Thanks @gfwilliams.
|
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-02 by @MaBecker What about a custom splash screen stored in flash and named “.splash”? Should include image and rotation. If .splash exist use it, otherwise load custom. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-04 by @gfwilliams
That sounds like a great idea! I can always make a zero-size file mean there is no splash screen. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-04 by ChristianW @gfwilliams I hoped you would say that ;-) |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-04 by @gfwilliams Just done - if you use a new firmware, create an image, go to http://www.espruino.com/Image+Converter and create it to a 1bpp white/black 'image string'. Then write to storage: There's no rotation done, so you'll need to rotate it yourself to landscape, then sort out what you need rotation-wise in the init code :) You may also have the image shifted up by one line because of the terminal, but you can actually disable the terminal completely by removing the internal link to the graphics object. Either do it right at the start of your 'save to flash' code, or add |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-04 by @MaBecker Perfekt - Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by ChristianW Thanks @gfwilliams. I just picked up on this, compiled+compiled a new firmware. Using a 90°CCW rotated flash image (see code) below. Maybe I am doing something wrong here, but two things happen after flashing:
This is my complete code, including the 90°CCW rotated image: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by @gfwilliams I think the image needs to be an 'image string' - looks like you maybe just exported it as 'image object' from the image converter - so ideally just typing |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by ChristianW Thanks @gfwilliams for the quick reply. It even is drawn after a power cycle - only the bottom few lines (or left part if you hold the Pixl in portrait mode) are missing (see photo). Attachments: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by @gfwilliams Have you tried the |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by ChristianW See my code above. Also checked: |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by ChristianW Sorry. My bad. I removed the Thanks @gfwilliams It's working now! (yay) And I also upgraded my bangle pledge to the early ones delivered in December by the way ;-) |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by ChristianW Update: NOW it works! |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-13 by @gfwilliams Great! :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-10-30 by ChristianW
After quite a while of Espruino abstinence there is a new private project for me: a bicycle computer.
When uploading code, doing a save() and a power cycle there is still the Pixl logo showing up before my code takes over the screen.
Also when connecting or disconnecting via bluetooth sometimes output shows up for a fraction of a second.
Where does that all come from - can it be disabled or avoided?
Thanks for any pointers.
Beta Was this translation helpful? Give feedback.
All reactions