This is a truly massive one - it has been a while coming! Some massive additions though...
It's worth noting that Bangle.js KickStarter units (and Puck.js v2 when released) shipped with a 2v05 release, which is kindof a pre-release. I couldn't release all other boards at the same
time because of issues with increased firmwware size on some boards.
Additions
Add Array.includes
Added Graphics.getFont/setFont/getFonts
Added Graphics.getFontHeight
Added option to compile in 6x8 fixed-width fonts
Added option to build in TensorFlow Lite for AI
nRF52: Add NRF.nfcPair(...) and OOB pairing to allow tap to pair over BLE
nRF52: Add NRF.nfcAndroidApp(...) to launch an Android app on touch
Graphics.setFont("4x6",2) will now double the size of a bitmap font
Graphics.drawImage can now take a String of data for an image (eg. direct from Storage)
require("Flash").write operations no longer need to be aligned
require("Storage").open added - for appendable files
nRF5x: Add NRF.filterDevices to allow scanned devices to be easily filtered after scanning
Add option to specify a palette when drawing images with drawImage
Add XON/XOFF flow control to Bluetooth LE UART (on by default)
Add a fast path for non-rotated non-scaled Graphics.drawImage
Add E.showMenu, deprecate Pixl.menu - use a common function to ease porting between devices
Added E.showPrompt, E.showAlert for Bangle.js and Pixl.js
Pixl.js - check '.splash' file at startup and use it for splash screen if it's there
Added E.defrag to perform defragmentation - still beta!
Flash Strings: On Bangle.js allow JS code (and other Strings) to be accessed without loading them completely from Flash
Allow g.setColor/setBgColor to take hex Strings of the form '#00ff00'
Add Graphics.toColor, and allow 4 bit Mac palette to be mapped to 8 bit web palette
Add Graphics.setClipRect to allow draw ops to be restricted to a certain area
Graphics: new g.fillPoly to handle irregular polygons
Graphics: drawEllipse/fillEllipse now work correctly for very small ellipses
Allow Storage.read to make partial file reads (fix #1744)
Add Graphics.reset, and ensure it (and g.clear(1)) unreference custom fonts
Added E.CRC32 for easy testing of data validity
Add E.on('kill' event for executing code before load/reset/save/etc
Allow optional load("filename") to load a JS file from Storage (was just load())
Add .toJSON handling for JSON.stringify, and add Date.toJSON (fix #1754)
Add Storage.writeJSON to avoid any confusion of writing arrays/numbers/etc
Add more info about flash memory to process.env/process.memory
Add Graphics.quadraticBezier()
Allow Graphics.setFont to be used with custom fonts (fix #1762)
Add E.setConsole/getConsole to allow console to be moved (including to 'null')
Add StorageFile.getLength() to get the current length of a StorageFile
Storage.list() can now take a RegEx/string to filter returned results
Storage.readJSON now has optional 2nd arg that stops it from creating exceptions on bad JSON
Add euro symbol to 6x8 and 4x6 fonts as char code 128 (ISO10646-1)
ESP32: add environment variable COMPORT to be used with make flash
Puck.js: v2 Support: Accelerometer/Gyro/temp
Puck.js: Self test now sets Puck.js BLE name if there's an error
Puck.js: Allow D21(RST) to be used as normal IO pin
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
This is a truly massive one - it has been a while coming! Some massive additions though...
It's worth noting that Bangle.js KickStarter units (and Puck.js v2 when released) shipped with a
2v05
release, which is kindof a pre-release. I couldn't release all other boards at the sametime because of issues with increased firmwware size on some boards.
Additions
'#00ff00'
E.on('kill'
event for executing code before load/reset/save/etcload("filename")
to load a JS file from Storage (was justload()
)Fixes
parseInt("0b",16)
as well as some other non-compliant behaviour (fix #1722)