Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Nodebot:
Arduino + Javascript
Desiree Santos
@desisant
•
Consultora ThoughtWorks Brasil
•
Open hardware desde 2009
•
Hobby #1 objetos interativos
•
Coordena (arduinrio...
@desisant
Agenda
•
IDE Sublime + Stino
•
IDE Arduino
•
Instalar nodejs
•
Download john-Five
Desenvolvimento:
100% prática:...
@desisant
Expectativa
Explorar meios diferentes para controlar o arduino
Utilizando ferramentas que aumentam a nossa produ...
@desisant
Arduino is an open-source electronics
platform based on easy-to-use
hardware and software.
It's intended for any...
@desisant
Arte de controlar arduino utilizando a linguaguem Javascript
@desisant
Montar o ambiente:
1) Baixar IDE arduino
→ www.arduino.cc/ → menu Download
2) Sublime Text → http://www.sublimet...
@desisant
Blink – Piscar Led
2 pin (digital)
5mm LED
330 ohm resistor (orange-orange-brown)
jumper wires
@desisant
var five = require("johnny-five");
var myBoard, myLed;
myBoard = new five.Board();
myBoard.on("ready", function(...
@desisant
Semáforo
3 pin (digital)
5mm LED
330 ohm resistor (orange-orange-brown)
jumper wires
@desisant
var five = require("johnny-five");
var board, leds=[], ledPins = [2,3,4,5,6,7,8,9];
board = new five.Board();
bo...
@desisant
•
2 pin header x 4
•
Piezo element
•
jumper wires
Música
@desisant
var five = require("johnny-five");
five.Board().on("ready", function() {
var piezo = new five.Piezo(9);
var val ...
@desisant
• 2 pin header x 4
• 5mm LED
• Pushbutton x 2
• 330 ohm resistor (orange-orange-brown)
• 10k Ohm Resistor (brown...
@desisant
var five = require("johnny-five"),
onButton, offButton, led;
five.Board().on("ready", function() {
onButton = ne...
@desisant
• 2 pin header x 4
• Potentiometer 10k ohm
• 5mm LED
• 330 ohm resistor (orange-orange-brown)
• jumper wires
Pot...
@desisant
var five = require("johnny-five"),
board, myPotentiometer;
board = new five.Board();
board.on("ready", function(...
@desisant
• 2 pin header x 4
• TMP36 Temperature sensor
• jumper wires
Temperatura
@desisant
var five = require("johnny-five");
five.Board().on("ready", function(){
var tempSensor = new five.Sensor("A0");
...
@desisant
@desisant
desisantos.wordpress.com
Dúvidas, suporte para projetos :
Próxima SlideShare
Cargando en…5
×

Nodebot: Arte de controlar arduino com javascript

1.526 visualizaciones

Publicado el

Workshop hands on no evento mundial Arduino Day(28/03/2015) mostrando na prática como controlar o arduino programando 100% em javascript. Utilizando apenas nodejs + Johnny-five.

Publicado en: Dispositivos y hardware
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

Nodebot: Arte de controlar arduino com javascript

  1. 1. Nodebot: Arduino + Javascript Desiree Santos
  2. 2. @desisant • Consultora ThoughtWorks Brasil • Open hardware desde 2009 • Hobby #1 objetos interativos • Coordena (arduinrio) • Modera arduinoBrasil • Hackerspace
  3. 3. @desisant Agenda • IDE Sublime + Stino • IDE Arduino • Instalar nodejs • Download john-Five Desenvolvimento: 100% prática: • Javascript • Eletrônica • Analógico • Digital Referência: node-ardx.org
  4. 4. @desisant Expectativa Explorar meios diferentes para controlar o arduino Utilizando ferramentas que aumentam a nossa produtividade Extrair o melhor que o arduino proporciona Alavancar aprendizado com JS + arduino para desenvolver projetos Javascript é meio e não fm, não é ofcina de javascript Sim Não Não se preocupe, haverá suporte para todos fcarem na mesma página
  5. 5. @desisant Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's intended for anyone making interactive projects. By Massimo Banzi
  6. 6. @desisant Arte de controlar arduino utilizando a linguaguem Javascript
  7. 7. @desisant Montar o ambiente: 1) Baixar IDE arduino → www.arduino.cc/ → menu Download 2) Sublime Text → http://www.sublimetext.com/2 3) Instalar plugin STINO no sublime text → https://github.com/Robot-Will/Stino 4) Instalar nodejs https://nodejs.org/
  8. 8. @desisant Blink – Piscar Led 2 pin (digital) 5mm LED 330 ohm resistor (orange-orange-brown) jumper wires
  9. 9. @desisant var five = require("johnny-five"); var myBoard, myLed; myBoard = new five.Board(); myBoard.on("ready", function() { myLed = new five.Led(13); myLed.strobe( 1000 ); // make myLED available as "led" in REPL this.repl.inject({ led: myLed }); // try "on", "off", "toggle", "strobe", "stop" (stops strobing) }); blink.js
  10. 10. @desisant Semáforo 3 pin (digital) 5mm LED 330 ohm resistor (orange-orange-brown) jumper wires
  11. 11. @desisant var five = require("johnny-five"); var board, leds=[], ledPins = [2,3,4,5,6,7,8,9]; board = new five.Board(); board.on("ready", function() { // initialize LEDs using a for loop for (var i = 0; i < ledPins.length; i++){ var myLed = new five.Led(ledPins[i]); leds.push(myLed); } function allOn(){ for (var i = 0; i < leds.length; i++) { leds[i].on(); } } function allOff(){ for (var i = 0; i < leds.length; i++) { leds[i].off(); } } function oneAfterAnother() { var delay = 1; board.counter = 0; for (var i = 0; i < leds.length; i++) { var led = leds[i]; board.wait(delay,function(){ console.log(this.counter + " on"); leds[this.counter].on(); }); board.wait(delay + 200,function(){ console.log(this.counter + " off"); leds[this.counter].off(); this.counter = (this.counter + 1) % leds.length; }); delay += 500; } } // allOn(); // board.wait(1000,allOff); oneAfterAnother(); semaforo.js
  12. 12. @desisant • 2 pin header x 4 • Piezo element • jumper wires Música
  13. 13. @desisant var five = require("johnny-five"); five.Board().on("ready", function() { var piezo = new five.Piezo(9); var val = 0; this.loop(200, function() { if (val ^= 1) { // Play note a4 for 1/5 second piezo.frequency(five.Piezo.Notes["a4"], 200); } }); }); Music.js
  14. 14. @desisant • 2 pin header x 4 • 5mm LED • Pushbutton x 2 • 330 ohm resistor (orange-orange-brown) • 10k Ohm Resistor (brown-black-orange) x 2 • jumper wires Push Button
  15. 15. @desisant var five = require("johnny-five"), onButton, offButton, led; five.Board().on("ready", function() { onButton = new five.Button(2); led = new five.Led(13); onButton.on("down", function(value){ led.on(); }); }); Button.js
  16. 16. @desisant • 2 pin header x 4 • Potentiometer 10k ohm • 5mm LED • 330 ohm resistor (orange-orange-brown) • jumper wires Potenciômetro
  17. 17. @desisant var five = require("johnny-five"), board, myPotentiometer; board = new five.Board(); board.on("ready", function() { myPotentiometer = new five.Sensor({ pin: "A0", freq: 250 }); myLed = new five.Led(9); myPotentiometer.on("read", function() { var rawValue = this.raw; myLed.brightness(Math.floor(rawValue / 4)); }); }); Potenciometro.js
  18. 18. @desisant • 2 pin header x 4 • TMP36 Temperature sensor • jumper wires Temperatura
  19. 19. @desisant var five = require("johnny-five"); five.Board().on("ready", function(){ var tempSensor = new five.Sensor("A0"); tempSensor.on("read", function(err, value){ var cel = (100 * (value / 1000) - 50).toFixed(2); console.log("temp is " + cel); }); }); Temperatura.js
  20. 20. @desisant @desisant desisantos.wordpress.com Dúvidas, suporte para projetos :

×