SlideShare a Scribd company logo
1 of 48
Download to read offline
Interactive Robotics with
Nerves and Elixir
Arto Bendiken
Phoenix (phoenixframework.org) is great. If you like Ruby
and Rails, Elixir and Phoenix will feel familiar but give you
more performance, scalability, and maintainability.
Rails developers have been known to retool to being
productive with Phoenix in as little as two weeks.
See Brian Cardarella’s talk “Rails to Phoenix” from RailsConf 2016:
https://www.youtube.com/watch?v=OxhTQdcieQE
The Killer App for Elixir?
Nerves (nerves-project.org) is the true killer app of Elixir. It’s
not yet widely known outside of the Elixir community, but that
is changing quickly (even in this very room, right now).
Nerves is doing to embedded development and Elixir
what Rails did for web development and Ruby.
The current statistics from the Elixir community on Slack:
#phoenix 12,420+ members, #nerves 990+ members
The Killer App for Elixir?
What is Nerves?
Nerves (nerves-project.org) enables you to “craft and deploy
bulletproof embedded software in Elixir”.
Nerves is an umbrella project consisting of tooling and
libraries enabling the development of robust, reliable
firmware for smart hardware devices written in a high-level
functional language (Elixir) and running on a carrier-grade
runtime (Erlang/OTP).
What is Nerves?
● Produces firmware images as small as
18 MB, which includes the Linux kernel,
the Erlang/OTP runtime, and your Nerves
application
● Firmware images are burned to an SD
card for deployment to target hardware
● The firmware boots in a few seconds: your
application code can be running in as little
3-4 seconds after power on
● An incredibly stable runtime platform with
low and predictable steady-state RAM
consumption: on the order of 8 MB, and
your application probably will fit in 32 MB
Linux kernel and rootfs (Buildroot)
Erlang/OTP runtime (BEAM)
Your Nerves application (Elixir)
Firmware image
● This is what the Erlang platform (OTP, BEAM) was designed for
(telecomms switches)—good soft-realtime support
● Pattern matching (with bitstring support) is great for
implementing wire protocols robustly
● The real world and real hardware is inherently concurrent,
asynchronous, and unpredictable—message passing with the
actor model is a good way to model that
● Fault tolerance and error recovery actually matter (just let it
crash—so long as the user doesn’t notice)
Why Elixir for Embedded Development?
Hobbyist Hardware for Nerves
Raspberry Pi 3 Model B (RPi3) BeagleBone Green (BBG)
Hobbyist Hardware for Nerves
Raspberry Pi 3 Model B (RPi3)
● $35 MSRP
● 1.2 GHz Cortex-A53 (4× cores)
● 1 GB LPDDR2 RAM
● 4× USB ports, 1× Ethernet port,
1× HDMI port, etc
● 40× GPIO pins
● 802.11n Wi-Fi
● Bluetooth 4.1 and LE
BeagleBone Green (BBG)
● $39 MSRP
● 1.0 GHz Cortex-A8
● 512 MB DDR3 RAM
● 1× USB port, 1× Ethernet port,
micro-HDMI as add-on, etc
● 92× GPIO pins and
2× Grove connectors
● Open-source hardware,
customizable for production
designs
Hobbyist Hardware for Nerves
Seeed Studio’s Grove System 100s of sensors and actuators
Example: LEDs and Buttons
### Seeed Studio Grove LED
alias Nerves.Grove.LED
{:ok, pid} = LED.start_link(pin)
LED.blink(pid)
### Seeed Studio Grove Button
alias Nerves.Grove.Button
{:ok, pid} = Button.start_link(pin)
# check if button is pressed:
state = Button.read(pid)
Example: Buzzers and OLEDs
### Seeed Studio Grove Buzzer
alias Nerves.Grove.Buzzer
{:ok, pid} = Buzzer.start_link(pin)
# make some ugly noise for 100 ms:
Buzzer.beep(pid, 0.1)
### Seeed Studio Grove OLED Display 96×96
alias Nerves.Grove.OLED
{:ok, pid} = OLED.Display.start_link(address)
OLED.Display.reset(pid)
OLED.Display.set_text_position(pid, 0, 0)
OLED.Display.put_string(pid, "Hello, world")
Commercial Products Based on Nerves
Commercial Radar Interface http://www.rosepoint.com/commercial-radar-interface/
Future Products Based on Nerves
Anything and everything… Your imagination is the limit.
https://hexdocs.pm/nerves/installation.html
$ brew update
$ brew install erlang elixir
$ brew install fwup squashfs coreutils
$ mix local.hex
$ mix local.rebar
$ mix archive.install 
https://github.com/nerves-project/archives/raw/master/nerves_bootstrap.ez
$ mix nerves.new hello_nerves
Installing Nerves (on Macs)
Join the Nerves Community
● Sign up for an account at:
https://elixir-slackin.herokuapp.com/
● Join the #nerves channel
● Currently 990+ members (March 2017)
● http://nerves-project.org/
What is Conreality?
Consensus Reality (aka Conreality, conreality.org) is a
live-action augmented-reality, tactical wargame platform
currently in an early development phase.
Conreality is built chiefly using Elixir and Nerves.
Reality is Boring
Let’s make it more interesting
Reality is Boring
“Anyone who sees a hurricane coming should warn others. I see a hurricane
coming.
“Over the next generation or two, ever larger numbers of people, hundreds of
millions, will become immersed in virtual worlds and online games. While we
are playing, things we used to do on the outside, in “reality,” won’t be happening
anymore, or won’t be happening in the same way. You can’t pull millions of
person-hours out of a society without creating an atmospheric-level event.
“If it happens in a generation, I think [this] century will see a social cataclysm larger
than that caused by cars, radios, and TV, combined. . . . The exodus of these
people from the real world, from our normal daily life, will create a [cataclysmic]
change in social climate.”
— Edward Castronova, Exodus to the Virtual World (2007)
Reality is Broken
“Gamers want to know: Where, in the real world, is that gamer sense of being fully
alive, focused, and engaged in every moment? Where is the gamer feeling of
power, heroic purpose, and community? Where are the bursts of exhilarating and
creative game accomplishment? Where is the heart-expanding thrill of success and
team victory?
“While gamers may experience these pleasures occasionally in their real lives, they
experience them almost constantly when they’re playing their favorite games. The
real world just doesn’t offer up as easily the carefully designed pleasures, the
thrilling challenges, and the powerful social bonding afforded by virtual
environments. . . . Reality, compared to games, is broken.”
— Jane McGonigal, Reality is Broken: Why Games Make Us Better and
How They Can Change the World (2011)
2016: VR and AR, At Long Last
Virtual Reality (VR)
Johnny Mnemonic (1995)
Augmented Reality (AR)
Iron Man (2008)
Say No
to VR
VR as a Solution to the Fermi Paradox?
“I suggest a different, even darker solution to the Paradox.
Basically, I think the aliens don’t blow themselves up; they just get
addicted to computer games.
“They forget to send radio signals or colonize space because they’re too
busy with runaway consumerism and virtual-reality narcissism. They don’t
need Sentinels to enslave them in a Matrix; they do it to themselves, just
as we are doing today.
“Once they turn inwards to chase their shiny pennies of pleasure, they
lose the cosmic plot. They become like a self-stimulating rat, pressing a
bar [which] feels…ever so good.”
— Geoffrey Miller, Why We Haven’t Met Any Aliens (2006)
http://seedmagazine.com/content/article/why_we_havent_met_any_aliens/
Cyberpunk Games
Dystopian virtual reality at its best
Cyberpunk Games
Deus Ex: Mankind Divided (Prague 2029)
Deus Ex: Mankind Divided
Live-Action Games
Bringing dystopia back home
Live-Action Games Today
● Historical reenactment
● LARPs
● Paintball
● Airsoft
● Laser tag
● Office games (e.g., nerf guns)
● Geocaching
● Rudimentary AR
○ Ingress
○ Pokemon Go
Airsoft pic w/o drone
Airsoft pic w/o drone
Paintball Battle Drone demo video
Augmented Reality
It’s all about the man-machine I/O interface
HoloLens demo video: Pokemon
Hyper-Reality AR demo video
Meta AR demo at TED 2016
https://www.ted.com/talks/meron_gribetz_a_glimpse_of_the_future_through_an_a
ugmented_reality_headset
Physical reality
You can't win. You can't break even. You can't even get out of the game.
Levels of Reality
Social reality
Social norms and false reifications; the world that has been pulled over your eyes.
Consensus reality
Names and labels, encyclopedic general knowledge and reference works.
Personal reality
Reminders, relationship indicators, reputation scores, personal preferences.
Tactical Software
Open source all the things
● After several decades of open source eating up the software industry, we now
have almost any conceivable software available in open-source form…
○ Infrastructure: Operating systems, web servers
○ Networking: Web browsers, email clients, secure messaging
○ Entertainment: Games, game engines, graphics engines, 3D engines
○ Design: Graphics editors, 3D modeling tools, CAD
○ Boring yet essential: Accounting software, ERP, POS
○ etc etc etc …
● However, what we do not have is open-source tactical software.
Open Source All The Things
● What exists today, inadvertently:
○ Open-source autopilots for planes/quadcopters
■ However, mainly focused aerial photography
○ Open-source physics engines
■ However, stark choice between exaggerated physics for games or slow, accurate
simulation of molecular dynamics
● Examples of what does not exist:
○ Physics engines with support for accurate terminal ballistics
■ Ensure a turret’s or drone’s airsoft or nerf gun pellet hits its intended target
○ Open-source targeting systems
■ Physical and semantic models for motion prediction
■ Laser guidance for object tracking
Tactical Software
Technology
A*, APM, BBB/BBG(W), BEC, BTLE, Buildroot, C/C++,
CoAP, DMA, DW1000, ESC, Elixir, Erlang, FPV, GAP, GATT,
GPIO, Gazebo, I2C, IRC, LIDAR, Lua, MATLAB, MQTT,
MAVLink, Nerves, NFC, OPTO, OpenCV, PCB, POSIX, PPM,
Prolog, PWM, PX4, PXFmini, QEMU, RDF, RK4, ROS, RPi,
RTLS, SBEC, SLAM, SPI, TCP, TDOA, UART, UBEC, UDP,
USB, UVC, UWB, V4L2, seL4, …
Concept Hardware
Rapid iteration through 3D printing
● Laser Turret MkI
● Scout Car MkI
WIP Concepts
● Recon Drone MkI
● Assault Drone MkI
WIP Concepts
WIP Concepts
Team in Berlin and Bratislava
● @ab0032 (Alexander)
● @bendiken (Arto)
● @dankomorny (Dan)
● @gilcherry (Gilbert)
● @joecoin (Joerg)
● @mikegogulski (Mike)
● Semi-regular hackathons in Berlin
and Bratislava
● Gather in one place to work on
proof-of-concepts and integrate
individual work being done
separately in Berlin and Bratislava
● The next Conreality Hackathon will
take place in Berlin the first week
of April 2017
Hackathons in Berlin and Bratislava
● Designers, coders, hackers, makers
○ A chance to participate in something tangible (non-abstract, unlike so
much software), highly challenging, and, most of all, plain old fun
● Promotional partnerships with design shops and hackerspaces
○ Exposure at a number major annual conferences as well as regular
meetups in hackerspaces that we’ll be giving talks at:
■ ProgressBar Hackerspace in Bratislava (2017)
■ HCPP17 in Prague (Oct 6-8, 2017)
■ Chaos Communication Congress (34C3) in Hamburg (Dec 2017)
■ FOSDEM 2018 in Brussels (Feb 2018)
■ etc etc etc …
Contribution Opportunities
Дякую!
Find me at:
http://ar.to & @bendiken

More Related Content

Viewers also liked

Trailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererTrailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererPivorak MeetUp
 
Functional Immutable CSS
Functional Immutable CSS Functional Immutable CSS
Functional Immutable CSS Pivorak MeetUp
 
Lightweight APIs in mRuby
Lightweight APIs in mRubyLightweight APIs in mRuby
Lightweight APIs in mRubyPivorak MeetUp
 
"5 skills to master" by Alexander Skakunov
"5 skills to master" by Alexander Skakunov"5 skills to master" by Alexander Skakunov
"5 skills to master" by Alexander SkakunovPivorak MeetUp
 
Overcommit for #pivorak
Overcommit for #pivorak Overcommit for #pivorak
Overcommit for #pivorak Pivorak MeetUp
 
"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton PaisovPivorak MeetUp
 
Digital Nomading on Rails
Digital Nomading on RailsDigital Nomading on Rails
Digital Nomading on RailsPivorak MeetUp
 
Building component based rails applications. part 1.
Building component based rails applications. part 1.Building component based rails applications. part 1.
Building component based rails applications. part 1.Pivorak MeetUp
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievPivorak MeetUp
 
Building Component Based Rails Applications. Part 2.
Building Component Based Rails Applications. Part 2.Building Component Based Rails Applications. Part 2.
Building Component Based Rails Applications. Part 2.Pivorak MeetUp
 
UDD: building polyglot anti-framework by Marek Piasecki
UDD: building polyglot anti-framework by Marek PiaseckiUDD: building polyglot anti-framework by Marek Piasecki
UDD: building polyglot anti-framework by Marek PiaseckiPivorak MeetUp
 
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMSBuilding Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMSPivorak MeetUp
 
Andriy Vandakurov about "Frontend. Global domination"
Andriy Vandakurov about  "Frontend. Global domination" Andriy Vandakurov about  "Frontend. Global domination"
Andriy Vandakurov about "Frontend. Global domination" Pivorak MeetUp
 
“Object Oriented Ruby” by Michał Papis.
“Object Oriented Ruby” by Michał Papis.“Object Oriented Ruby” by Michał Papis.
“Object Oriented Ruby” by Michał Papis.Pivorak MeetUp
 
"Meet rom_rb & dry_rb" by Piotr Solnica
"Meet rom_rb & dry_rb" by Piotr Solnica"Meet rom_rb & dry_rb" by Piotr Solnica
"Meet rom_rb & dry_rb" by Piotr SolnicaPivorak MeetUp
 
Pivorak How to write better sentences in English
Pivorak How to write better sentences in EnglishPivorak How to write better sentences in English
Pivorak How to write better sentences in EnglishPivorak MeetUp
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivAndrzej Krzywda
 

Viewers also liked (20)

GIS on Rails
GIS on RailsGIS on Rails
GIS on Rails
 
Trailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererTrailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick Sutterer
 
Functional Immutable CSS
Functional Immutable CSS Functional Immutable CSS
Functional Immutable CSS
 
Lightweight APIs in mRuby
Lightweight APIs in mRubyLightweight APIs in mRuby
Lightweight APIs in mRuby
 
"5 skills to master" by Alexander Skakunov
"5 skills to master" by Alexander Skakunov"5 skills to master" by Alexander Skakunov
"5 skills to master" by Alexander Skakunov
 
Overcommit for #pivorak
Overcommit for #pivorak Overcommit for #pivorak
Overcommit for #pivorak
 
"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov
 
Digital Nomading on Rails
Digital Nomading on RailsDigital Nomading on Rails
Digital Nomading on Rails
 
Building component based rails applications. part 1.
Building component based rails applications. part 1.Building component based rails applications. part 1.
Building component based rails applications. part 1.
 
The Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey VasilievThe Silver Bullet Syndrome by Alexey Vasiliev
The Silver Bullet Syndrome by Alexey Vasiliev
 
Espec |> Elixir BDD
Espec |> Elixir BDDEspec |> Elixir BDD
Espec |> Elixir BDD
 
Building Component Based Rails Applications. Part 2.
Building Component Based Rails Applications. Part 2.Building Component Based Rails Applications. Part 2.
Building Component Based Rails Applications. Part 2.
 
UDD: building polyglot anti-framework by Marek Piasecki
UDD: building polyglot anti-framework by Marek PiaseckiUDD: building polyglot anti-framework by Marek Piasecki
UDD: building polyglot anti-framework by Marek Piasecki
 
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMSBuilding Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMS
 
Andriy Vandakurov about "Frontend. Global domination"
Andriy Vandakurov about  "Frontend. Global domination" Andriy Vandakurov about  "Frontend. Global domination"
Andriy Vandakurov about "Frontend. Global domination"
 
“Object Oriented Ruby” by Michał Papis.
“Object Oriented Ruby” by Michał Papis.“Object Oriented Ruby” by Michał Papis.
“Object Oriented Ruby” by Michał Papis.
 
"Meet rom_rb & dry_rb" by Piotr Solnica
"Meet rom_rb & dry_rb" by Piotr Solnica"Meet rom_rb & dry_rb" by Piotr Solnica
"Meet rom_rb & dry_rb" by Piotr Solnica
 
Pivorak How to write better sentences in English
Pivorak How to write better sentences in EnglishPivorak How to write better sentences in English
Pivorak How to write better sentences in English
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, Lviv
 
Elastic pivorak
Elastic pivorakElastic pivorak
Elastic pivorak
 

More from Pivorak MeetUp

Lisp(Lots of Irritating Superfluous Parentheses)
Lisp(Lots of Irritating Superfluous Parentheses)Lisp(Lots of Irritating Superfluous Parentheses)
Lisp(Lots of Irritating Superfluous Parentheses)Pivorak MeetUp
 
Some strange stories about mocks.
Some strange stories about mocks.Some strange stories about mocks.
Some strange stories about mocks.Pivorak MeetUp
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communicationPivorak MeetUp
 
How i was a team leader once
How i was a team leader onceHow i was a team leader once
How i was a team leader oncePivorak MeetUp
 
Rails MVC by Sergiy Koshovyi
Rails MVC by Sergiy KoshovyiRails MVC by Sergiy Koshovyi
Rails MVC by Sergiy KoshovyiPivorak MeetUp
 
Introduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukIntroduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukPivorak MeetUp
 
Ruby OOP (in Ukrainian)
Ruby OOP (in Ukrainian)Ruby OOP (in Ukrainian)
Ruby OOP (in Ukrainian)Pivorak MeetUp
 
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in RubyRuby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in RubyPivorak MeetUp
 
The Saga Pattern: 2 years later by Robert Pankowecki
The Saga Pattern: 2 years later by Robert PankoweckiThe Saga Pattern: 2 years later by Robert Pankowecki
The Saga Pattern: 2 years later by Robert PankoweckiPivorak MeetUp
 
Data and Bounded Contexts by Volodymyr Byno
Data and Bounded Contexts by Volodymyr BynoData and Bounded Contexts by Volodymyr Byno
Data and Bounded Contexts by Volodymyr BynoPivorak MeetUp
 
Successful Remote Development by Alex Rozumii
Successful Remote Development by Alex RozumiiSuccessful Remote Development by Alex Rozumii
Successful Remote Development by Alex RozumiiPivorak MeetUp
 
Origins of Elixir programming language
Origins of Elixir programming languageOrigins of Elixir programming language
Origins of Elixir programming languagePivorak MeetUp
 
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
Detective story of one clever user - Lightning Talk By Sergiy KukuninDetective story of one clever user - Lightning Talk By Sergiy Kukunin
Detective story of one clever user - Lightning Talk By Sergiy KukuninPivorak MeetUp
 
CryptoParty: Introduction by Olexii Markovets
CryptoParty: Introduction by Olexii MarkovetsCryptoParty: Introduction by Olexii Markovets
CryptoParty: Introduction by Olexii MarkovetsPivorak MeetUp
 
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
How to make first million by 30 (or not, but tryin') - by Marek PiaseckiHow to make first million by 30 (or not, but tryin') - by Marek Piasecki
How to make first million by 30 (or not, but tryin') - by Marek PiaseckiPivorak MeetUp
 
GIS on Rails by Oleksandr Kychun
GIS on Rails by Oleksandr Kychun GIS on Rails by Oleksandr Kychun
GIS on Rails by Oleksandr Kychun Pivorak MeetUp
 
Unikernels - Keep It Simple to the Bare Metal
Unikernels - Keep It Simple to the Bare MetalUnikernels - Keep It Simple to the Bare Metal
Unikernels - Keep It Simple to the Bare MetalPivorak MeetUp
 
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
 HTML Canvas tips & tricks - Lightning Talk by Roman Rodych HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
HTML Canvas tips & tricks - Lightning Talk by Roman RodychPivorak MeetUp
 
Linux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovLinux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovPivorak MeetUp
 

More from Pivorak MeetUp (20)

Lisp(Lots of Irritating Superfluous Parentheses)
Lisp(Lots of Irritating Superfluous Parentheses)Lisp(Lots of Irritating Superfluous Parentheses)
Lisp(Lots of Irritating Superfluous Parentheses)
 
Some strange stories about mocks.
Some strange stories about mocks.Some strange stories about mocks.
Some strange stories about mocks.
 
Business-friendly library for inter-service communication
Business-friendly library for inter-service communicationBusiness-friendly library for inter-service communication
Business-friendly library for inter-service communication
 
How i was a team leader once
How i was a team leader onceHow i was a team leader once
How i was a team leader once
 
Rails MVC by Sergiy Koshovyi
Rails MVC by Sergiy KoshovyiRails MVC by Sergiy Koshovyi
Rails MVC by Sergiy Koshovyi
 
Introduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy HinyukIntroduction to Rails by Evgeniy Hinyuk
Introduction to Rails by Evgeniy Hinyuk
 
Ruby OOP (in Ukrainian)
Ruby OOP (in Ukrainian)Ruby OOP (in Ukrainian)
Ruby OOP (in Ukrainian)
 
Testing in Ruby
Testing in RubyTesting in Ruby
Testing in Ruby
 
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in RubyRuby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
Ruby Summer Course by #pivorak & OnApp - OOP Basics in Ruby
 
The Saga Pattern: 2 years later by Robert Pankowecki
The Saga Pattern: 2 years later by Robert PankoweckiThe Saga Pattern: 2 years later by Robert Pankowecki
The Saga Pattern: 2 years later by Robert Pankowecki
 
Data and Bounded Contexts by Volodymyr Byno
Data and Bounded Contexts by Volodymyr BynoData and Bounded Contexts by Volodymyr Byno
Data and Bounded Contexts by Volodymyr Byno
 
Successful Remote Development by Alex Rozumii
Successful Remote Development by Alex RozumiiSuccessful Remote Development by Alex Rozumii
Successful Remote Development by Alex Rozumii
 
Origins of Elixir programming language
Origins of Elixir programming languageOrigins of Elixir programming language
Origins of Elixir programming language
 
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
Detective story of one clever user - Lightning Talk By Sergiy KukuninDetective story of one clever user - Lightning Talk By Sergiy Kukunin
Detective story of one clever user - Lightning Talk By Sergiy Kukunin
 
CryptoParty: Introduction by Olexii Markovets
CryptoParty: Introduction by Olexii MarkovetsCryptoParty: Introduction by Olexii Markovets
CryptoParty: Introduction by Olexii Markovets
 
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
How to make first million by 30 (or not, but tryin') - by Marek PiaseckiHow to make first million by 30 (or not, but tryin') - by Marek Piasecki
How to make first million by 30 (or not, but tryin') - by Marek Piasecki
 
GIS on Rails by Oleksandr Kychun
GIS on Rails by Oleksandr Kychun GIS on Rails by Oleksandr Kychun
GIS on Rails by Oleksandr Kychun
 
Unikernels - Keep It Simple to the Bare Metal
Unikernels - Keep It Simple to the Bare MetalUnikernels - Keep It Simple to the Bare Metal
Unikernels - Keep It Simple to the Bare Metal
 
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
 HTML Canvas tips & tricks - Lightning Talk by Roman Rodych HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
HTML Canvas tips & tricks - Lightning Talk by Roman Rodych
 
Linux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene PirogovLinux Tracing Superpowers by Eugene Pirogov
Linux Tracing Superpowers by Eugene Pirogov
 

Recently uploaded

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

Interactive robotics with Elixir and Nerves by Arto Bendiken

  • 1. Interactive Robotics with Nerves and Elixir Arto Bendiken
  • 2. Phoenix (phoenixframework.org) is great. If you like Ruby and Rails, Elixir and Phoenix will feel familiar but give you more performance, scalability, and maintainability. Rails developers have been known to retool to being productive with Phoenix in as little as two weeks. See Brian Cardarella’s talk “Rails to Phoenix” from RailsConf 2016: https://www.youtube.com/watch?v=OxhTQdcieQE The Killer App for Elixir?
  • 3. Nerves (nerves-project.org) is the true killer app of Elixir. It’s not yet widely known outside of the Elixir community, but that is changing quickly (even in this very room, right now). Nerves is doing to embedded development and Elixir what Rails did for web development and Ruby. The current statistics from the Elixir community on Slack: #phoenix 12,420+ members, #nerves 990+ members The Killer App for Elixir?
  • 4. What is Nerves? Nerves (nerves-project.org) enables you to “craft and deploy bulletproof embedded software in Elixir”. Nerves is an umbrella project consisting of tooling and libraries enabling the development of robust, reliable firmware for smart hardware devices written in a high-level functional language (Elixir) and running on a carrier-grade runtime (Erlang/OTP).
  • 5. What is Nerves? ● Produces firmware images as small as 18 MB, which includes the Linux kernel, the Erlang/OTP runtime, and your Nerves application ● Firmware images are burned to an SD card for deployment to target hardware ● The firmware boots in a few seconds: your application code can be running in as little 3-4 seconds after power on ● An incredibly stable runtime platform with low and predictable steady-state RAM consumption: on the order of 8 MB, and your application probably will fit in 32 MB Linux kernel and rootfs (Buildroot) Erlang/OTP runtime (BEAM) Your Nerves application (Elixir) Firmware image
  • 6. ● This is what the Erlang platform (OTP, BEAM) was designed for (telecomms switches)—good soft-realtime support ● Pattern matching (with bitstring support) is great for implementing wire protocols robustly ● The real world and real hardware is inherently concurrent, asynchronous, and unpredictable—message passing with the actor model is a good way to model that ● Fault tolerance and error recovery actually matter (just let it crash—so long as the user doesn’t notice) Why Elixir for Embedded Development?
  • 7. Hobbyist Hardware for Nerves Raspberry Pi 3 Model B (RPi3) BeagleBone Green (BBG)
  • 8. Hobbyist Hardware for Nerves Raspberry Pi 3 Model B (RPi3) ● $35 MSRP ● 1.2 GHz Cortex-A53 (4× cores) ● 1 GB LPDDR2 RAM ● 4× USB ports, 1× Ethernet port, 1× HDMI port, etc ● 40× GPIO pins ● 802.11n Wi-Fi ● Bluetooth 4.1 and LE BeagleBone Green (BBG) ● $39 MSRP ● 1.0 GHz Cortex-A8 ● 512 MB DDR3 RAM ● 1× USB port, 1× Ethernet port, micro-HDMI as add-on, etc ● 92× GPIO pins and 2× Grove connectors ● Open-source hardware, customizable for production designs
  • 9. Hobbyist Hardware for Nerves Seeed Studio’s Grove System 100s of sensors and actuators
  • 10. Example: LEDs and Buttons ### Seeed Studio Grove LED alias Nerves.Grove.LED {:ok, pid} = LED.start_link(pin) LED.blink(pid) ### Seeed Studio Grove Button alias Nerves.Grove.Button {:ok, pid} = Button.start_link(pin) # check if button is pressed: state = Button.read(pid)
  • 11. Example: Buzzers and OLEDs ### Seeed Studio Grove Buzzer alias Nerves.Grove.Buzzer {:ok, pid} = Buzzer.start_link(pin) # make some ugly noise for 100 ms: Buzzer.beep(pid, 0.1) ### Seeed Studio Grove OLED Display 96×96 alias Nerves.Grove.OLED {:ok, pid} = OLED.Display.start_link(address) OLED.Display.reset(pid) OLED.Display.set_text_position(pid, 0, 0) OLED.Display.put_string(pid, "Hello, world")
  • 12. Commercial Products Based on Nerves Commercial Radar Interface http://www.rosepoint.com/commercial-radar-interface/
  • 13. Future Products Based on Nerves Anything and everything… Your imagination is the limit.
  • 14. https://hexdocs.pm/nerves/installation.html $ brew update $ brew install erlang elixir $ brew install fwup squashfs coreutils $ mix local.hex $ mix local.rebar $ mix archive.install https://github.com/nerves-project/archives/raw/master/nerves_bootstrap.ez $ mix nerves.new hello_nerves Installing Nerves (on Macs)
  • 15. Join the Nerves Community ● Sign up for an account at: https://elixir-slackin.herokuapp.com/ ● Join the #nerves channel ● Currently 990+ members (March 2017) ● http://nerves-project.org/
  • 16. What is Conreality? Consensus Reality (aka Conreality, conreality.org) is a live-action augmented-reality, tactical wargame platform currently in an early development phase. Conreality is built chiefly using Elixir and Nerves.
  • 17. Reality is Boring Let’s make it more interesting
  • 18. Reality is Boring “Anyone who sees a hurricane coming should warn others. I see a hurricane coming. “Over the next generation or two, ever larger numbers of people, hundreds of millions, will become immersed in virtual worlds and online games. While we are playing, things we used to do on the outside, in “reality,” won’t be happening anymore, or won’t be happening in the same way. You can’t pull millions of person-hours out of a society without creating an atmospheric-level event. “If it happens in a generation, I think [this] century will see a social cataclysm larger than that caused by cars, radios, and TV, combined. . . . The exodus of these people from the real world, from our normal daily life, will create a [cataclysmic] change in social climate.” — Edward Castronova, Exodus to the Virtual World (2007)
  • 19. Reality is Broken “Gamers want to know: Where, in the real world, is that gamer sense of being fully alive, focused, and engaged in every moment? Where is the gamer feeling of power, heroic purpose, and community? Where are the bursts of exhilarating and creative game accomplishment? Where is the heart-expanding thrill of success and team victory? “While gamers may experience these pleasures occasionally in their real lives, they experience them almost constantly when they’re playing their favorite games. The real world just doesn’t offer up as easily the carefully designed pleasures, the thrilling challenges, and the powerful social bonding afforded by virtual environments. . . . Reality, compared to games, is broken.” — Jane McGonigal, Reality is Broken: Why Games Make Us Better and How They Can Change the World (2011)
  • 20. 2016: VR and AR, At Long Last Virtual Reality (VR) Johnny Mnemonic (1995) Augmented Reality (AR) Iron Man (2008)
  • 22. VR as a Solution to the Fermi Paradox? “I suggest a different, even darker solution to the Paradox. Basically, I think the aliens don’t blow themselves up; they just get addicted to computer games. “They forget to send radio signals or colonize space because they’re too busy with runaway consumerism and virtual-reality narcissism. They don’t need Sentinels to enslave them in a Matrix; they do it to themselves, just as we are doing today. “Once they turn inwards to chase their shiny pennies of pleasure, they lose the cosmic plot. They become like a self-stimulating rat, pressing a bar [which] feels…ever so good.” — Geoffrey Miller, Why We Haven’t Met Any Aliens (2006) http://seedmagazine.com/content/article/why_we_havent_met_any_aliens/
  • 23. Cyberpunk Games Dystopian virtual reality at its best
  • 25. Deus Ex: Mankind Divided (Prague 2029)
  • 26. Deus Ex: Mankind Divided
  • 28. Live-Action Games Today ● Historical reenactment ● LARPs ● Paintball ● Airsoft ● Laser tag ● Office games (e.g., nerf guns) ● Geocaching ● Rudimentary AR ○ Ingress ○ Pokemon Go
  • 32. Augmented Reality It’s all about the man-machine I/O interface
  • 35. Meta AR demo at TED 2016 https://www.ted.com/talks/meron_gribetz_a_glimpse_of_the_future_through_an_a ugmented_reality_headset
  • 36. Physical reality You can't win. You can't break even. You can't even get out of the game. Levels of Reality Social reality Social norms and false reifications; the world that has been pulled over your eyes. Consensus reality Names and labels, encyclopedic general knowledge and reference works. Personal reality Reminders, relationship indicators, reputation scores, personal preferences.
  • 38. ● After several decades of open source eating up the software industry, we now have almost any conceivable software available in open-source form… ○ Infrastructure: Operating systems, web servers ○ Networking: Web browsers, email clients, secure messaging ○ Entertainment: Games, game engines, graphics engines, 3D engines ○ Design: Graphics editors, 3D modeling tools, CAD ○ Boring yet essential: Accounting software, ERP, POS ○ etc etc etc … ● However, what we do not have is open-source tactical software. Open Source All The Things
  • 39. ● What exists today, inadvertently: ○ Open-source autopilots for planes/quadcopters ■ However, mainly focused aerial photography ○ Open-source physics engines ■ However, stark choice between exaggerated physics for games or slow, accurate simulation of molecular dynamics ● Examples of what does not exist: ○ Physics engines with support for accurate terminal ballistics ■ Ensure a turret’s or drone’s airsoft or nerf gun pellet hits its intended target ○ Open-source targeting systems ■ Physical and semantic models for motion prediction ■ Laser guidance for object tracking Tactical Software
  • 40. Technology A*, APM, BBB/BBG(W), BEC, BTLE, Buildroot, C/C++, CoAP, DMA, DW1000, ESC, Elixir, Erlang, FPV, GAP, GATT, GPIO, Gazebo, I2C, IRC, LIDAR, Lua, MATLAB, MQTT, MAVLink, Nerves, NFC, OPTO, OpenCV, PCB, POSIX, PPM, Prolog, PWM, PX4, PXFmini, QEMU, RDF, RK4, ROS, RPi, RTLS, SBEC, SLAM, SPI, TCP, TDOA, UART, UBEC, UDP, USB, UVC, UWB, V4L2, seL4, …
  • 41. Concept Hardware Rapid iteration through 3D printing
  • 42. ● Laser Turret MkI ● Scout Car MkI WIP Concepts ● Recon Drone MkI ● Assault Drone MkI
  • 45. Team in Berlin and Bratislava ● @ab0032 (Alexander) ● @bendiken (Arto) ● @dankomorny (Dan) ● @gilcherry (Gilbert) ● @joecoin (Joerg) ● @mikegogulski (Mike)
  • 46. ● Semi-regular hackathons in Berlin and Bratislava ● Gather in one place to work on proof-of-concepts and integrate individual work being done separately in Berlin and Bratislava ● The next Conreality Hackathon will take place in Berlin the first week of April 2017 Hackathons in Berlin and Bratislava
  • 47. ● Designers, coders, hackers, makers ○ A chance to participate in something tangible (non-abstract, unlike so much software), highly challenging, and, most of all, plain old fun ● Promotional partnerships with design shops and hackerspaces ○ Exposure at a number major annual conferences as well as regular meetups in hackerspaces that we’ll be giving talks at: ■ ProgressBar Hackerspace in Bratislava (2017) ■ HCPP17 in Prague (Oct 6-8, 2017) ■ Chaos Communication Congress (34C3) in Hamburg (Dec 2017) ■ FOSDEM 2018 in Brussels (Feb 2018) ■ etc etc etc … Contribution Opportunities