Smartwatch 06/29/2023

Espruino for PineTime 40

After the successful construction of the board to replace the original PineTime, the work of implementing a firmware begins, initially my approach was to create something from scratch, but it did not work, the time and effort required exceeds what I can spare for the project, the second option was to convert https://infinitime.io/, but that option ended up being discarded when I remembered that I had been testing Espruino, but I hadn’t advanced much due to the lack of features of the original PineTime, but now I didn’t have that constraint.

Espruino is a JavaScript interpreter for microcontrollers. It is designed for devices with as little as 128kB Flash and 8kB RAM.

More about Espruino

What caught my attention in Espruino was the possibility of being able to create applications using Javascript and without the need to upload a new firmware, just take an online editor, write the code and upload that code to the smartwatch and it’s working.
Furthermore, one of the projects that uses Espruino is based on the same processor, the nRF52840, I’m talking about https://www.espruino.com/Bangle.js2, which would make adaptation to the new board much easier.

Source code for my version of Espruino for PinetTime 40 https://github.com/joaquimorg/Espruino

First version

After the first tests with the version already customized and adapted for the new board, I came to the conclusion that the implemented graphics system does not take advantage of the display and the refresh rate that the nRF52840 offers, since in Bangle.js2 the display is only one 176×176, while in Pinetime we have 240×240.

So there’s nothing better than trying to bring LVGL to work as a graphical interface with all (for now, just some) of its features and possibilities.
At this moment it is already possible to create simple screens using the LVGL functions.

A more complex example.

All the applications are developed using JavaScript and can be edited and uploaded using the online IDE.

Development continues, more news coming soon…