![Page 1: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/1.jpg)
Ladislav Prskavec @abtris
PragueJS October 2014
microcontroller that runs JavaScript
![Page 2: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/2.jpg)
![Page 3: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/3.jpg)
![Page 4: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/4.jpg)
Module Port A
Module Port B Module Port D
Module Port C
GPIO
![Page 6: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/6.jpg)
reset buttonwifi button
Status/debug LEDsPower LED
![Page 7: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/7.jpg)
![Page 8: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/8.jpg)
![Page 9: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/9.jpg)
![Page 10: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/10.jpg)
![Page 11: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/11.jpg)
Blinkvar tessel = require('tessel') var led1 = tessel.led[0].output(1);var led2 = tessel.led[1].output(0);setInterval(function() { console.log("I'm bliking!!!"); led1.toggle(); led2.toggle();}, 1000);
![Page 12: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/12.jpg)
BlinkDEMO
![Page 13: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/13.jpg)
Climatevar tessel = require('tessel');var climatelib = require('climate-si7020');var climate = climatelib.use(tessel.port['D']);climate.on('ready', function () { console.log('Connected to si7005'); setImmediate(function loop () { climate.readTemperature('c', function (err, temp) { climate.readHumidity(function (err, humid) { console.log('Degrees:', temp.toFixed(4) + 'C', 'Humidity:', humid.toFixed(4) + '%RH'); setTimeout(loop, 300); }); }); });});climate.on('error', function(err) { console.log('error connecting module', err);});
![Page 14: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/14.jpg)
ClimateDEMO
![Page 15: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/15.jpg)
Ambientvar tessel = require('tessel');var ambientlib = require('ambient-attx4');var ambient = ambientlib.use(tessel.port['B']);ambient.on('ready', function () { setInterval( function () { ambient.getLightLevel( function(err, ldata) { if (err) throw err; ambient.getSoundLevel( function(err, sdata) { if (err) throw err; console.log("Light level:", ldata.toFixed(8), " ", "Sound Level:", sdata.toFixed(8)); }); })}, 500); // The readings will happen every .5 seconds unless the trigger is hit ambient.setLightTrigger(0.5); // Set a light level trigger // The trigger is a float between 0 and 1 ambient.on('light-trigger', function(data) { console.log("Our light trigger was hit:", data); // Clear the trigger so it stops firing ambient.clearLightTrigger(); // After 1.5 seconds reset light trigger setTimeout(function () { ambient.setLightTrigger(0.5); },1500); }); ...
![Page 16: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/16.jpg)
AmbientDEMO
![Page 17: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/17.jpg)
Web ServerDEMO
![Page 18: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/18.jpg)
Web ServerDEMO
![Page 20: Tessel is a microcontroller that runs JavaScript](https://reader030.vdocument.in/reader030/viewer/2022020410/58f9ab07760da3da068b7f44/html5/thumbnails/20.jpg)
Resources• http://start.tessel.io/install
• https://tessel.io/docs/power
• https://projects.tessel.io/projects
• https://github.com/tessel/hardware/blob/master/design-files.md
• https://forums.tessel.io/
• https://github.com/tessel/ambient-attx4
• https://github.com/tessel/climate-si7020
• https://github.com/tessel/relay-mono
• https://github.com/johnnyman727/mqtt-climate
• https://github.com/johnnyman727/tessel-webserver-demo