Why does my 8x8 matrix stop displaying? #4818
Replies: 1 comment
-
Posted at 2019-11-27 by @allObjects Glad you like Espruino as SW and also committed to the HW... otherwise the SW part would cease to exist... or just sink into the big bit bucket as many open source do... (and so do many proprietary SWs: they become open source so the dying away users can still maintain the code until they die themselves... and the sw can finally die together with them as well - hope I got the d-i/y right as a non-English language native). ...wild goose - more seasonal: turkey - chase: most likely the log buffer has filled up and log output does not know where to go else (if disconnected...?). Therefore comment If you hit disconnects for what ever reason, add Btw 1, do not understand the Btw 2, you can put your WLAN credentials into a module and keep it locally in your Espruino Web IDE sandbox Posted at 2019-11-27 by Robin Wed 2019.11.27 Hi @Coder2012, don't have these devices to be able to test,
but I did notice a few things. It's likely bad data is being passed to the graphics object, or an array is going out of range or running out of memory perhaps. Function scroll() is called one time. L42 and L43 will only be called one time, incidentally As L45 is being called ten times a second, to check if running out of memory, place a process.memory() inside that interval. I'd also only check, say every tenth time using a conditional such as if( (skipcounts % 10) == 0 ) so that output to the console *(Left-Hand side)* may keep up. Could also check the arguments at that point to see if out of bounds errors may be occurring.
Try placing a try/catch block around the functions called inside onInit() to see if any errors are occurring, bubbling up and not being caught. Suspect L34. Using concat repetitively may be appending beyond the available buffer size. Posted at 2019-11-27 by Coder2012 Hey guys, Thank you so much for taking the time to have a look at my code: Good tips for debugging. I'll add an L24 I've read about places to put the WiFi creds and yes I'll do that when i'm happy its working well. If it's bad data or an out of range error, wouldn't that crash the whole thing? I mentioned that the Espruino is still calling the Pi4 every 3 seconds even after display stops, so surely there's no error here? Or could it be repeatedly throwing an error but still making calls? Yes Good tip about the Really appreciate the advice, will see what I can find out and report back. Posted at 2019-11-27 by Coder2012 OK sorry @robin, I see what you mean't with the So thanks to you two, i've been able to debug this, and it turned out to be a problem with L46. That test there sometimes didn't reset Thanks a lot. Posted at 2019-11-27 by @allObjects I don't know how your scroll behaves. Since it is not much data, it may do well. There are though alternatives: Reading out and pushing to display can handle the scroll by moving the readout start pointer... No need for redrawing all the time... this is especially useful when drawing more complex things... The readout can then be compiled js or even written in c... see for example conversation about [Efficiently moving things around in zig-zag Graphics buffer visualized w/ 24/32 bpp displays / neopixel strings] (http://forum.espruino.com/conversations/330679/) Posted at 2019-11-27 by Robin Glad you got it all sorted out, and in a short period of time to boot!
Just to clarify for others reading along, that statement would hold true for the test condition using if(). However, it was the use of the argument value for var interval that would cause an error with the clearInterval() function, which requires the timer ID which you have identified is numeric. Was it also realized that the interval argument is never used/reset? > 'That test there sometimes didn't reset i = 8' re: L46 So was it just a simple Posted at 2019-11-29 by Coder2012 Hello again, Yes exactly |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-11-27 by Coder2012
Hey guys,
I have an Espruino WiFi (love this thing) with an 8x8 matrix led display as recommended here. I have node-red running on my Raspberry PI 4. My Espruino makes calls every 3 seconds to my PI to get the current time and displays it scrolling across the matrix.
The problem is it just stops after about 10 minutes, I checked the Rasperry Pi and it is still being called by the Espruino every 3 seconds in the log. So the reason it's not displaying could be in this script somewhere, just not sure how to even debug it...
Beta Was this translation helpful? Give feedback.
All reactions