UNPKG

432 BJavaScriptView Raw
1var tessel = require('tessel');
2var Attiny = require('attiny-common');
3
4var attiny = new Attiny(tessel.port['A']);
5
6var firmwareOptions = {
7 firmwareFile : 'firmware/src/infrared-attx4.hex',
8 firmwareVersion : 3,
9 moduleID : 0x0B,
10 signature : 0x930C,
11 crc : 13777,
12}
13
14// Force an update
15attiny.updateFirmware(firmwareOptions, function(err) {
16 if (err) {
17 throw err
18 }
19 else {
20 console.log('done updating...');
21 }
22});
\No newline at end of file