SlideShare une entreprise Scribd logo
1  sur  49
Javascript on Arduino
Keith Bloomfield - Dev9
Javascript on Arduino
● Told from experience
– motivation
– approach
– lessons learned
● Talking points:
– hardware
– software
– design patterns
– hardware/software
integration
– code samples
Javascript on Arduino
Motivation
Javascript on Arduino
Motivation
SainSmart palletizing
robotic arm
Javascript on Arduino
Motivation
SainSmart palletizing
robotic arm - $118.23
Javascript on Arduino
Motivation
SainSmart palletizing
robotic arm - $118.23
Pros
● Much cheaper than rival
hobby robotic arms
● Performs surprisingly well
in terms of speed
Javascript on Arduino
Motivation
SainSmart palletizing
robotic arm - $118.23
Cons
● Not much lifting power
● Difficult to replace parts
● No instructions
Javascript on Arduino
Motivation
IoT is the buzzword of the day
Javascript on Arduino
Motivation
IoT is the buzzword of the day
Javascript on Arduino
Motivation
IoT is the buzzword of the day
But it isn't entirely new
● Parts are cheaper
● Tutorials are available
● Technology is more developer friendly
● Similar reasons why many people became
software developers
● We will get back to this
Javascript on Arduino
Arduino
- Is a microcontroller (Open source prototyping platform) – A small
computer on a single integrated circuit (memory, processor, I/O peripherals).
- One of several competing products
Shield
- Extends capabilities of the Arduino
- Requires a driver
- Requires soldering
Javascript on Arduino
Javascript is powering devices
● Johnny-five http://johnny-five.io
● Cylon http://cylonjs.com
● Espruino (Javascript on the metal) http://www.espruino.com/
● and more!
Javascript on Arduino
Javascript is powering devices
Firmata: It's a protocol, it's a library...
Javascript on Arduino
Javascript is powering devices
Firmata: It's a protocol, it's a library...
- Enables communication between a
computer and a microcontroller using the
midi message format:
http://www.midi.org/techspecs/midimessages.php
Javascript on Arduino
IoT is the buzzword of the day?
Javascript on Arduino
IoT is the buzzword of the day?
The cloud acts as the OS of the device.
Javascript on Arduino
Software:
johnny-five: JS Robotics & IoT framework
compulsive ('13) – Loops and delays without traditional
timers. Time based event loop process queue
temporal? (TODO '14) – Non-blocking, temporal task
sequencing.
Javascript is powering devices
Javascript on Arduino
johnny-five
- has a useful REPL
(read-eval-print loop)
- supports a growing number of
boards, shields, sensors,
actuators
Javascript is powering devices
Javascript on Arduino
Hardware: Arduino Mega 2560
AdaFruit Servo Shield
Servos
IR motion sensor
Javascript is powering devices
Javascript on Arduino
Hardware: Load Sensor
HX711 Load Cell Amp
MultiColor Led
HUZZA ESP8266 Wifi breakout
Javascript is powering devices
Javascript on Arduino
Powered by:
Arduino: Basic arm motion only
(4) 1.5V AA Batteries: Arm with augmented body
5V 2A power supply: Arm, lid, motion sensor. Struggles lifting
when all 3 in operation at the same time.
5V 10A power supply: Sufficient
Servos require lots of power!
Javascript on Arduino
Be careful about mishaps. The larger/stronger the robot, the
more severe the accident.
Accidents can quickly disable functionality.
Servos require lots of power!
Javascript on Arduino
Be careful about mishaps. The larger/stronger the robot, the
more severe the accident.
Accidents can quickly disable functionality.
Recovery may take several days (new hardware in the mail)
Servos require lots of power!
Javascript on Arduino
Be careful about mishaps. The larger/stronger the robot, the
more severe the accident.
Accidents can quickly disable functionality.
Recovery may take several days (new hardware in the mail)
+ Add an emergency stop early
Servos require lots of power!
Javascript on Arduino
When composition relies heavily on found
components, and the idea is ad hoc, hardware
refactoring/reassembly is frequent.
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
When composition relies heavily on found
components, and the idea is ad hoc, hardware
refactoring/reassembly is frequent.
+ Plan well, measure accurately and thoroughly.
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
When composition relies heavily on found
components, and the idea is ad hoc, hardware
refactoring/reassembly is frequent.
+ Plan well, measure accurately and thoroughly.
+ Expect to spend considerable time refactoring if you
are planning as you go.
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
+ Refactor small, iterative/incremental, stable as possible
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
+ Refactor small, iterative/incremental, stable as possible
+ Use a board to track tasks
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
+ Refactor small, iterative/incremental, stable as possible
+ Use a board to track tasks
+ Keep changes in sync with the REPL
Lesson: It's easy to end up in
the weeds
Javascript on Arduino
Couples sensory information to action selection (what to do next)
in an intimate bottom-up fashion.
Subsumption Architecture
Javascript on Arduino
Subsumption Architecture
Couples sensory information to action selection (what to do next)
in an intimate bottom-up fashion.
Behaviors prioritized and interruptive.
Javascript on Arduino
Subsumption Architecture
Couples sensory information to action selection (what to do next)
in an intimate bottom-up fashion.
Behaviors prioritized and interruptive.
Lejos: Robot accessed directly through behaviors, focus on
looping actions broken by flipping a boolean to false. Static
methods/fields for convenience
Javascript on Arduino
Couples sensory information to action selection (what to do next)
in an intimate bottom-up fashion.
Behaviors prioritized and interruptive.
Lejos: Robot accessed directly through behaviors, focus on
looping actions broken by flipping a boolean to false. Static
methods/fields for convenience
Challenge: Action selection implementation
Subsumption Architecture
Javascript on Arduino
Hardware in terms of stateful objects
On node.js?
Subsumption Architecture
Javascript on Arduino
Johnny-five:
Animation
Subsumption Architecture
Javascript on Arduino
REST + JSON?
●
Javascript on Arduino
REST + JSON?
● CoAP (Constrained Application Protocol)
http://coap.technology/
● QUIC (Quick UDP Internet Connections)
https://www.chromium.org/quic
● CBOR (Concise Binary Object Representation)
http://cbor.io/
● Apache thrift
https://thrift.apache.org/
● protobuf (Protocol Buffers – serializing structured
data)
https://github.com/google/protobuf
Javascript on Arduino
- Costly,
prohibitive
ramp-up time
● Inexpensive,
interoperable, plug-and-
play components
● Expensive computation
occurs in the cloud
● The only limitation is
creativity
Javascript on Arduino
The Robot...
Javascript on Arduino
Javascript on Arduino
- Detects presence of cat
Javascript on Arduino
- Detects presence of cat
-Waits for cat to do its business
Javascript on Arduino
- Detects presence of cat
-Waits for cat to do its business
-Warns off nearby cat(s)
Javascript on Arduino
- Detects presence of cat
-Waits for cat to do its business
-Warns off nearby cat(s)
-Scoops the clumps, deposits
them in bin
Javascript on Arduino
- Detects presence of cat
-Waits for cat to do its business
-Warns off nearby cat(s)
-Scoops the clumps, deposits
them in bin
- Levels the mounds
Javascript on Arduino
- Detects presence of cat
-Waits for cat to do its business
-Warns off nearby cat(s)
-Scoops the clumps, deposits
them in bin
- Levels the mounds
(v2) Tracks litter level in bin
(v2) Notifies user once bin is full
(v2) Detects clumps
(v2) Wireless
Javascript on Arduino
Demo + Q&A
Github:
github.com/kthblmfld/poopscavator
Demo:
https://www.youtube.com/watch?v=kCbXBw0zStk

Contenu connexe

Tendances

Eating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsEating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsRobotGrrl
 
Start! ATS programming
Start! ATS programmingStart! ATS programming
Start! ATS programmingKiwamu Okabe
 
Hands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerHands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerKiwamu Okabe
 
How to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsHow to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsJeff Prestes
 
Cloud Deep Learning Chips Training & Inference
Cloud Deep Learning Chips Training & InferenceCloud Deep Learning Chips Training & Inference
Cloud Deep Learning Chips Training & InferenceMr. Vengineer
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017 Stefano Sanna
 
Netloab toolkit 1112
Netloab toolkit 1112Netloab toolkit 1112
Netloab toolkit 1112馬 萬圳
 
Introduction to Arduino Programming
Introduction to Arduino ProgrammingIntroduction to Arduino Programming
Introduction to Arduino ProgrammingJames Lewis
 
ATS programming on ESP8266
ATS programming on ESP8266ATS programming on ESP8266
ATS programming on ESP8266Kiwamu Okabe
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyOmer Kilic
 
Massive applications in node.js
Massive applications in node.jsMassive applications in node.js
Massive applications in node.jsJan Jongboom
 
Make Happiness a Habit: Refactoring Web Applications
Make Happiness a Habit: Refactoring Web ApplicationsMake Happiness a Habit: Refactoring Web Applications
Make Happiness a Habit: Refactoring Web ApplicationsAnn Robson
 
Metasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoMetasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoKiwamu Okabe
 
All your legos are belong to Us Gr8Conf.EU 2015
All your legos are belong to Us Gr8Conf.EU 2015All your legos are belong to Us Gr8Conf.EU 2015
All your legos are belong to Us Gr8Conf.EU 2015Ryan Vanderwerf
 

Tendances (14)

Eating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsEating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & Apps
 
Start! ATS programming
Start! ATS programmingStart! ATS programming
Start! ATS programming
 
Hands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontrollerHands-on VeriFast with STM32 microcontroller
Hands-on VeriFast with STM32 microcontroller
 
How to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of ThingsHow to make your Money Machine with Internet of Things
How to make your Money Machine with Internet of Things
 
Cloud Deep Learning Chips Training & Inference
Cloud Deep Learning Chips Training & InferenceCloud Deep Learning Chips Training & Inference
Cloud Deep Learning Chips Training & Inference
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
 
Netloab toolkit 1112
Netloab toolkit 1112Netloab toolkit 1112
Netloab toolkit 1112
 
Introduction to Arduino Programming
Introduction to Arduino ProgrammingIntroduction to Arduino Programming
Introduction to Arduino Programming
 
ATS programming on ESP8266
ATS programming on ESP8266ATS programming on ESP8266
ATS programming on ESP8266
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
 
Massive applications in node.js
Massive applications in node.jsMassive applications in node.js
Massive applications in node.js
 
Make Happiness a Habit: Refactoring Web Applications
Make Happiness a Habit: Refactoring Web ApplicationsMake Happiness a Habit: Refactoring Web Applications
Make Happiness a Habit: Refactoring Web Applications
 
Metasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on ArduinoMetasepi team meeting #19: ATS application on Arduino
Metasepi team meeting #19: ATS application on Arduino
 
All your legos are belong to Us Gr8Conf.EU 2015
All your legos are belong to Us Gr8Conf.EU 2015All your legos are belong to Us Gr8Conf.EU 2015
All your legos are belong to Us Gr8Conf.EU 2015
 

Similaire à Javascript on Arduino

IoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveIoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveAndri Yadi
 
Cesec2015 - Arduino Designer
Cesec2015 - Arduino DesignerCesec2015 - Arduino Designer
Cesec2015 - Arduino Designermelbats
 
Concurrecy in Ruby
Concurrecy in RubyConcurrecy in Ruby
Concurrecy in RubyVesna Doknic
 
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxBuilding a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxPyData
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first designKyrylo Reznykov
 
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides. Utrecht, April 2016Mark West
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemWill Iverson
 
Coding Mojo : Node.js Meetup
Coding Mojo : Node.js MeetupCoding Mojo : Node.js Meetup
Coding Mojo : Node.js MeetupMark West
 
Using R for the internet of things
Using R for the internet of thingsUsing R for the internet of things
Using R for the internet of thingscdhowe
 
第5回SCDN - Ruby Summer of Code: NArray on OpenCL
第5回SCDN - Ruby Summer of Code: NArray on OpenCL第5回SCDN - Ruby Summer of Code: NArray on OpenCL
第5回SCDN - Ruby Summer of Code: NArray on OpenCLscdn
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
Transparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaTransparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaKazuaki Ishizaki
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsAndri Yadi
 
Internet of Things - Technological Perspective
Internet of Things - Technological PerspectiveInternet of Things - Technological Perspective
Internet of Things - Technological PerspectiveAndri Yadi
 

Similaire à Javascript on Arduino (20)

Ruby - The Hard Bits
Ruby - The Hard BitsRuby - The Hard Bits
Ruby - The Hard Bits
 
Johnny-Five
Johnny-FiveJohnny-Five
Johnny-Five
 
IoT Session Thomas More
IoT Session Thomas MoreIoT Session Thomas More
IoT Session Thomas More
 
Cc internet of things @ Thomas More
Cc internet of things @ Thomas MoreCc internet of things @ Thomas More
Cc internet of things @ Thomas More
 
IoT Development from Software Developer Perspective
IoT Development from Software Developer PerspectiveIoT Development from Software Developer Perspective
IoT Development from Software Developer Perspective
 
Cesec2015 - Arduino Designer
Cesec2015 - Arduino DesignerCesec2015 - Arduino Designer
Cesec2015 - Arduino Designer
 
Concurrecy in Ruby
Concurrecy in RubyConcurrecy in Ruby
Concurrecy in Ruby
 
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael VaroquauxBuilding a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
 
nodebots presentation @seekjobs
nodebots presentation @seekjobsnodebots presentation @seekjobs
nodebots presentation @seekjobs
 
Raising ux bar with offline first design
Raising ux bar with offline first designRaising ux bar with offline first design
Raising ux bar with offline first design
 
Arduino
ArduinoArduino
Arduino
 
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky Problem
 
Coding Mojo : Node.js Meetup
Coding Mojo : Node.js MeetupCoding Mojo : Node.js Meetup
Coding Mojo : Node.js Meetup
 
Using R for the internet of things
Using R for the internet of thingsUsing R for the internet of things
Using R for the internet of things
 
第5回SCDN - Ruby Summer of Code: NArray on OpenCL
第5回SCDN - Ruby Summer of Code: NArray on OpenCL第5回SCDN - Ruby Summer of Code: NArray on OpenCL
第5回SCDN - Ruby Summer of Code: NArray on OpenCL
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Transparent GPU Exploitation for Java
Transparent GPU Exploitation for JavaTransparent GPU Exploitation for Java
Transparent GPU Exploitation for Java
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
 
Internet of Things - Technological Perspective
Internet of Things - Technological PerspectiveInternet of Things - Technological Perspective
Internet of Things - Technological Perspective
 

Dernier

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Javascript on Arduino

  • 1.
  • 2. Javascript on Arduino Keith Bloomfield - Dev9
  • 3. Javascript on Arduino ● Told from experience – motivation – approach – lessons learned ● Talking points: – hardware – software – design patterns – hardware/software integration – code samples
  • 6. Javascript on Arduino Motivation SainSmart palletizing robotic arm - $118.23
  • 7. Javascript on Arduino Motivation SainSmart palletizing robotic arm - $118.23 Pros ● Much cheaper than rival hobby robotic arms ● Performs surprisingly well in terms of speed
  • 8. Javascript on Arduino Motivation SainSmart palletizing robotic arm - $118.23 Cons ● Not much lifting power ● Difficult to replace parts ● No instructions
  • 9. Javascript on Arduino Motivation IoT is the buzzword of the day
  • 10. Javascript on Arduino Motivation IoT is the buzzword of the day
  • 11. Javascript on Arduino Motivation IoT is the buzzword of the day But it isn't entirely new ● Parts are cheaper ● Tutorials are available ● Technology is more developer friendly ● Similar reasons why many people became software developers ● We will get back to this
  • 12. Javascript on Arduino Arduino - Is a microcontroller (Open source prototyping platform) – A small computer on a single integrated circuit (memory, processor, I/O peripherals). - One of several competing products Shield - Extends capabilities of the Arduino - Requires a driver - Requires soldering
  • 13. Javascript on Arduino Javascript is powering devices ● Johnny-five http://johnny-five.io ● Cylon http://cylonjs.com ● Espruino (Javascript on the metal) http://www.espruino.com/ ● and more!
  • 14. Javascript on Arduino Javascript is powering devices Firmata: It's a protocol, it's a library...
  • 15. Javascript on Arduino Javascript is powering devices Firmata: It's a protocol, it's a library... - Enables communication between a computer and a microcontroller using the midi message format: http://www.midi.org/techspecs/midimessages.php
  • 16. Javascript on Arduino IoT is the buzzword of the day?
  • 17. Javascript on Arduino IoT is the buzzword of the day? The cloud acts as the OS of the device.
  • 18. Javascript on Arduino Software: johnny-five: JS Robotics & IoT framework compulsive ('13) – Loops and delays without traditional timers. Time based event loop process queue temporal? (TODO '14) – Non-blocking, temporal task sequencing. Javascript is powering devices
  • 19. Javascript on Arduino johnny-five - has a useful REPL (read-eval-print loop) - supports a growing number of boards, shields, sensors, actuators Javascript is powering devices
  • 20. Javascript on Arduino Hardware: Arduino Mega 2560 AdaFruit Servo Shield Servos IR motion sensor Javascript is powering devices
  • 21. Javascript on Arduino Hardware: Load Sensor HX711 Load Cell Amp MultiColor Led HUZZA ESP8266 Wifi breakout Javascript is powering devices
  • 22. Javascript on Arduino Powered by: Arduino: Basic arm motion only (4) 1.5V AA Batteries: Arm with augmented body 5V 2A power supply: Arm, lid, motion sensor. Struggles lifting when all 3 in operation at the same time. 5V 10A power supply: Sufficient Servos require lots of power!
  • 23. Javascript on Arduino Be careful about mishaps. The larger/stronger the robot, the more severe the accident. Accidents can quickly disable functionality. Servos require lots of power!
  • 24. Javascript on Arduino Be careful about mishaps. The larger/stronger the robot, the more severe the accident. Accidents can quickly disable functionality. Recovery may take several days (new hardware in the mail) Servos require lots of power!
  • 25. Javascript on Arduino Be careful about mishaps. The larger/stronger the robot, the more severe the accident. Accidents can quickly disable functionality. Recovery may take several days (new hardware in the mail) + Add an emergency stop early Servos require lots of power!
  • 26. Javascript on Arduino When composition relies heavily on found components, and the idea is ad hoc, hardware refactoring/reassembly is frequent. Lesson: It's easy to end up in the weeds
  • 27. Javascript on Arduino When composition relies heavily on found components, and the idea is ad hoc, hardware refactoring/reassembly is frequent. + Plan well, measure accurately and thoroughly. Lesson: It's easy to end up in the weeds
  • 28. Javascript on Arduino When composition relies heavily on found components, and the idea is ad hoc, hardware refactoring/reassembly is frequent. + Plan well, measure accurately and thoroughly. + Expect to spend considerable time refactoring if you are planning as you go. Lesson: It's easy to end up in the weeds
  • 29. Javascript on Arduino + Refactor small, iterative/incremental, stable as possible Lesson: It's easy to end up in the weeds
  • 30. Javascript on Arduino + Refactor small, iterative/incremental, stable as possible + Use a board to track tasks Lesson: It's easy to end up in the weeds
  • 31. Javascript on Arduino + Refactor small, iterative/incremental, stable as possible + Use a board to track tasks + Keep changes in sync with the REPL Lesson: It's easy to end up in the weeds
  • 32. Javascript on Arduino Couples sensory information to action selection (what to do next) in an intimate bottom-up fashion. Subsumption Architecture
  • 33. Javascript on Arduino Subsumption Architecture Couples sensory information to action selection (what to do next) in an intimate bottom-up fashion. Behaviors prioritized and interruptive.
  • 34. Javascript on Arduino Subsumption Architecture Couples sensory information to action selection (what to do next) in an intimate bottom-up fashion. Behaviors prioritized and interruptive. Lejos: Robot accessed directly through behaviors, focus on looping actions broken by flipping a boolean to false. Static methods/fields for convenience
  • 35. Javascript on Arduino Couples sensory information to action selection (what to do next) in an intimate bottom-up fashion. Behaviors prioritized and interruptive. Lejos: Robot accessed directly through behaviors, focus on looping actions broken by flipping a boolean to false. Static methods/fields for convenience Challenge: Action selection implementation Subsumption Architecture
  • 36. Javascript on Arduino Hardware in terms of stateful objects On node.js? Subsumption Architecture
  • 39. Javascript on Arduino REST + JSON? ● CoAP (Constrained Application Protocol) http://coap.technology/ ● QUIC (Quick UDP Internet Connections) https://www.chromium.org/quic ● CBOR (Concise Binary Object Representation) http://cbor.io/ ● Apache thrift https://thrift.apache.org/ ● protobuf (Protocol Buffers – serializing structured data) https://github.com/google/protobuf
  • 40. Javascript on Arduino - Costly, prohibitive ramp-up time ● Inexpensive, interoperable, plug-and- play components ● Expensive computation occurs in the cloud ● The only limitation is creativity
  • 43. Javascript on Arduino - Detects presence of cat
  • 44. Javascript on Arduino - Detects presence of cat -Waits for cat to do its business
  • 45. Javascript on Arduino - Detects presence of cat -Waits for cat to do its business -Warns off nearby cat(s)
  • 46. Javascript on Arduino - Detects presence of cat -Waits for cat to do its business -Warns off nearby cat(s) -Scoops the clumps, deposits them in bin
  • 47. Javascript on Arduino - Detects presence of cat -Waits for cat to do its business -Warns off nearby cat(s) -Scoops the clumps, deposits them in bin - Levels the mounds
  • 48. Javascript on Arduino - Detects presence of cat -Waits for cat to do its business -Warns off nearby cat(s) -Scoops the clumps, deposits them in bin - Levels the mounds (v2) Tracks litter level in bin (v2) Notifies user once bin is full (v2) Detects clumps (v2) Wireless
  • 49. Javascript on Arduino Demo + Q&A Github: github.com/kthblmfld/poopscavator Demo: https://www.youtube.com/watch?v=kCbXBw0zStk