• You can check the error flags - https://www.espruino.com/Reference#l_E_getErrorFlags - but more details you would have to access with peek... where though is not known to me... may be it can be figured out looking at the firmware / source code...

    You can bend / spread the leads a bit to get better contact.

    Check also the battery of your puck...

    Some architectural detail:

    Espruino has mainly two interrupt driven activities:

    • Low level hardware activities that pick up pin changes and when watched it puts details it into an interrupt/event queue (similar do timeouts and intervals and completions of some low level functions, like receiving or sending data). This has highest priority and interrupts the other level of activities.

    • High level javascript activities that pick up what is in the event/interrupt queue and executes the piece of javascript that is tied to it. When done with one piece, it checks for the next one and executes it until all is done and then it goes to sleep / idle.

    Since hardware events can happen much quicker than javascript can act on it, the events are put in the event queue. To not miss any events in JavaScript, JavaScript pieces should be as short/small as possible... after all, you have only one processor...

About

Avatar for allObjects @allObjects started