This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
let AppName = 'HelWrld'; | |
Storage.write('-' + AppName, ` | |
Bangle.setLCDMode('80x80'); | |
g.clear(); | |
g.setFont('6x8',2); | |
g.setColor('#BFFF00'); | |
/**** draw actual icon contents ****/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
let AppName = 'HelWrld'; | |
Storage.write( | |
'*' + AppName, | |
'require("heatshrink").decompress(atob("mEwxH+If4A/AH4A/AH4A/AH4A/AH4A3lQDGBpIPLACEw1EwAYkGBpAJBAoYvY1wvCAYQEBEYYJDF4QPDCIwvRqkqqgfCqmEwg0DF5BlDMyYbBAAcqlWurVaNIxfGFwNUqgwSL4YpBF4Wu1AvEdQIvDeAQEBAYIRCDIK/TCoOorVUKgr1EAoRfGfZ4PDAYYbBwhJDYwIeDAogRBGwbbDABglDAYcwmCIBAwZFFAghwDwhwDAFTxQKoZZEAH4AWX44TPOwYbSmGoUIIDDSRYPDGwgbGF5muB4NUAYQIBC4ZMBAwI5BCYYMDrQHCBYwvKqmEF4dU1GoqgMBwla1GuGYQPCGoIXB1wvTEQIBClR6BqgxBAoIhBqkqL4yIBCIIvSIwQuBLIWuBIJZBF4IJBOYjkCCIgvCwgvOSAQWDL4z4EBgRfIlVUCASQNMIJCCX4uoJgoRGX4hfPIIMGPoQ3CC4YJEBgYRFBwYuPAH4A/AH4A/AH4A/AH4A/AH4A/AC4A="))' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bangle.setLCDMode('80x80'); | |
g.clear(); | |
g.setFont('6x8'); | |
g.setColor('#BFFF00'); | |
/**** draw lines which help cropping the screen shot ****/ | |
g.drawLine(0,48,80,48); | |
g.drawLine(48,0,48,80); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
let AppName = 'HelWrld'; | |
Storage.write('+' + AppName, JSON.stringify({ | |
name: '"Hello, World!" for Bangle.js', | |
type: 'app', | |
icon: '*' + AppName, | |
src: '-' + AppName, | |
version: '0.0.1', | |
files: '+'+AppName+',-'+AppName+',*'+AppName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
let FileList = Storage.list(); | |
let segmentedAppSet = Object.create(null); | |
for (let i = 0, l = FileList.length; i < l; i++) { | |
let FileName = FileList[i]; | |
if (/^\+.*\x01$/.test(FileName)) { | |
segmentedAppSet[FileName.replace(/.$/,'')] = true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
print('compacting internal Storage...'); | |
Storage.compact(); | |
print('internal Storage report:'); | |
print('-',Storage.getFree(),'bytes free'); | |
print('- list of stored files'); | |
let FileList = Storage.list(); | |
let segmentedFileSet = Object.create(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Storage = require('Storage'); | |
let FileName = 'LenaImg', FileOffset = 0; | |
function writeLine (encodedPixelLine) { | |
let PixelLine = atob(encodedPixelLine); | |
if (FileOffset === 0) { | |
Storage.write(FileName,PixelLine, 0,240*240*2); | |
FileOffset = 2*240; | |
} else { | |
Storage.write(FileName,PixelLine,FileOffset); | |
FileOffset += 2*240; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bangle.setLCDMode(); | |
g.clear(); | |
function drawSlice (i,compressedBuffer) { | |
g.drawImage({ | |
width:240, height:10, bpp:16, transparent:0, | |
buffer:require("heatshrink").decompress(atob(compressedBuffer)) | |
},0,i*10); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bangle.setLCDMode(); | |
g.clear(); | |
const Width = g.getWidth(), CenterX = Width/2; | |
const Height = g.getHeight(), CenterY = Height/2; | |
let Pattern = { | |
width:16, height:16, bpp:16, transparent:0, | |
buffer:require("heatshrink").decompress(atob("s2EAIsVooVTDpIBDDrohHDrIBDDrohRJ4IhbR4ohXZ5IhTd5ohRDpapVDpYhXdtohPDp7LNDqYhJDq4hFCo4")) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bangle.setLCDMode(); | |
g.clear(); | |
const Width = g.getWidth(), CenterX = Width/2; | |
const Height = g.getHeight(), CenterY = Height/2; | |
let HoursHandle = { | |
width:60, height:6, bpp:1, | |
buffer:require("heatshrink").decompress(atob("v//AAnvAwoAW+4GF/wA=")) | |
}; |