Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Espurino
JavaScript for Microcontrollers
● Presenter: Drew Fustini (drew@pdp7.com / @pdp7)
● Website: http://www.espruino.com/
● Kickstarter:
https://www.kickstarter.com/projects/gfw/espruino-javascript-for-thing
● Videos:
https://www.youtube.com/playlist?list=PLa1tazUyp-oOELRUt6tSuZIo
Espruino - JavaScript for Microcontrollers
Espruino - JavaScript for Microcontrollers
Espruino - JavaScript for Microcontrollers
Why JavaScript?
● Doesn't need compiling
● Can be modified and added to while running
● Has good support for Strings, Objects, Maps and Arrays
● Has similar syntax to common languages like C, C++ (Arduino) and
Java
● Can easily be event-based
● Is widely used, easy to learn and flexible
● JavaScript is the obvious (and possibly the only) language that does
all this. Almost every website on the internet depends on it, and many
websites such as Codeacademy provide free tutorials and lessons.
Millions of people use it every day.
● We've tried to keep the API similar to Arduino's though - so if you've
done any Arduino programming you should feel right at home. Even
if you haven't, it means that a lot of what you learn with Espruino will
be transferrable to other platforms.
Espruino board
Tech specs
● STM32 32-bit 72MHz ARM Cortex M3 CPU
● 256KB of Flash memory, 48KB of RAM
● Micro USB connector
● Input Voltage Range of 3.6v to 15v
● Battery connector (JST 2 Pin)
●
Built-in SD card connector
● Red, Green and Blue LEDs
● Pads to allow HC-05 Bluetooth modules to be added
● 44 GPIO Pins, which can handle: 26 PWM Pins, 16 ADC Pins, 3 USARTs, 2 SPI, 2 I2C and 2
DACs
●
Prototype area which can be used in many different configurations, for example: Servo Headers,
Up to 14x 500mA outputs, 2x .NET Gadgeteer connectors, or NRF24L01+ wireless transceiver
modules
● WiFi Support with the TI CC3000 WiFi module (not included)
Price: $40 from Seeed
http://www.seeedstudio.com/depot/Espruino-board-
Option A) Connect via serial over USB
Option B) Web IDE (Chrome browser app)
Quick Start
● http://www.espruino.com/Quick+Start
● digitalWrite(LED1,1)
● digitalWrite(LED1,0)
● function toggle() { on = !on; digitalWrite(LED1, on); }
● toggle()
● var interval = setInterval(toggle, 500)
● edit(toggle)
● function toggle() { on = !on; digitalWrite(LED1, on);
digitalWrite(LED2, !on); }
● changeInterval(interval, 200);
● clearInterval(interval);
● rest() OR save()
Control string of LEDs
http://www.espruino.com/Individually+Addressable+LEDs
Video:
https://www.youtube.com/watch?v=hanahdauDiE&index=3&list=PLa1tazU
Another Javascript board: Tessel
● http://makezine.com/magazine/first-look-javascript-micro-controllers-for-
● “The Tessel from technical.io […] is aimed
on high end of the gap between the
Arduino and the Raspberry Pi, squarely at
Internet-connected applications targeting
physical devices, and has WiFi built-in.
That means not only that the board is
always online, allowing it to be used as
both as a server and a client, but you
have the ability to remotely deploy your
code onto the board via the network.”
Micro Python
● https://www.kickstarter.com/projects/214379695/micro-python-python
● http://www.micropython.org/
● “lean and fast implementation of the Python 3 programming
language that is optimised to run on a microcontroller. The
Micro Python board is a small electronic circuit board that runs
the Micro Python language”

More Related Content

Espruino - JavaScript for Microcontrollers

  • 1. Espurino JavaScript for Microcontrollers ● Presenter: Drew Fustini (drew@pdp7.com / @pdp7) ● Website: http://www.espruino.com/ ● Kickstarter: https://www.kickstarter.com/projects/gfw/espruino-javascript-for-thing ● Videos: https://www.youtube.com/playlist?list=PLa1tazUyp-oOELRUt6tSuZIo
  • 5. Why JavaScript? ● Doesn't need compiling ● Can be modified and added to while running ● Has good support for Strings, Objects, Maps and Arrays ● Has similar syntax to common languages like C, C++ (Arduino) and Java ● Can easily be event-based ● Is widely used, easy to learn and flexible ● JavaScript is the obvious (and possibly the only) language that does all this. Almost every website on the internet depends on it, and many websites such as Codeacademy provide free tutorials and lessons. Millions of people use it every day. ● We've tried to keep the API similar to Arduino's though - so if you've done any Arduino programming you should feel right at home. Even if you haven't, it means that a lot of what you learn with Espruino will be transferrable to other platforms.
  • 7. Tech specs ● STM32 32-bit 72MHz ARM Cortex M3 CPU ● 256KB of Flash memory, 48KB of RAM ● Micro USB connector ● Input Voltage Range of 3.6v to 15v ● Battery connector (JST 2 Pin) ● Built-in SD card connector ● Red, Green and Blue LEDs ● Pads to allow HC-05 Bluetooth modules to be added ● 44 GPIO Pins, which can handle: 26 PWM Pins, 16 ADC Pins, 3 USARTs, 2 SPI, 2 I2C and 2 DACs ● Prototype area which can be used in many different configurations, for example: Servo Headers, Up to 14x 500mA outputs, 2x .NET Gadgeteer connectors, or NRF24L01+ wireless transceiver modules ● WiFi Support with the TI CC3000 WiFi module (not included)
  • 8. Price: $40 from Seeed http://www.seeedstudio.com/depot/Espruino-board-
  • 9. Option A) Connect via serial over USB Option B) Web IDE (Chrome browser app)
  • 10. Quick Start ● http://www.espruino.com/Quick+Start ● digitalWrite(LED1,1) ● digitalWrite(LED1,0) ● function toggle() { on = !on; digitalWrite(LED1, on); } ● toggle() ● var interval = setInterval(toggle, 500) ● edit(toggle) ● function toggle() { on = !on; digitalWrite(LED1, on); digitalWrite(LED2, !on); } ● changeInterval(interval, 200); ● clearInterval(interval); ● rest() OR save()
  • 11. Control string of LEDs http://www.espruino.com/Individually+Addressable+LEDs Video: https://www.youtube.com/watch?v=hanahdauDiE&index=3&list=PLa1tazU
  • 12. Another Javascript board: Tessel ● http://makezine.com/magazine/first-look-javascript-micro-controllers-for- ● “The Tessel from technical.io […] is aimed on high end of the gap between the Arduino and the Raspberry Pi, squarely at Internet-connected applications targeting physical devices, and has WiFi built-in. That means not only that the board is always online, allowing it to be used as both as a server and a client, but you have the ability to remotely deploy your code onto the board via the network.”
  • 13. Micro Python ● https://www.kickstarter.com/projects/214379695/micro-python-python ● http://www.micropython.org/ ● “lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller. The Micro Python board is a small electronic circuit board that runs the Micro Python language”