Just to add it's not quite Charlieplexing - just standard multiplexing.
As @allObjects says analogWrite is unlikely to work, but you can slow down the update rate, which will in turn dim the whole image.
startScanning actually returns the 'interval number', so if you change the line startScanning(); to scanInterval = startScanning(); then you can then use changeInterval(scanInterval, X); to change the brightness.
Having X as 10 is the default (100Hz), but you could slowly change it to 100 (which will start to look a bit flickery, but which will be 1/10th of the brightness).
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.
Just to add it's not quite Charlieplexing - just standard multiplexing.
As @allObjects says analogWrite is unlikely to work, but you can slow down the update rate, which will in turn dim the whole image.
startScanning
actually returns the 'interval number', so if you change the linestartScanning();
toscanInterval = startScanning();
then you can then usechangeInterval(scanInterval, X);
to change the brightness.Having
X
as10
is the default (100Hz), but you could slowly change it to 100 (which will start to look a bit flickery, but which will be 1/10th of the brightness).