SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Brewing ALE with Pi
Kristian Kristensen
@kkristensen
Get $5 to start:!
http://bit.ly/
VenmoKristian
Agenda
•

Beer Brewing

•

Raspberry Pi

•

Erlang/ALE

•

Monitoring temperatures
Raspberry Pi
•

ARM 700 MHz CPU

•

512 MB RAM

•

10/100 Ethernet

•

HDMI, Comp. Video, Audio.

•

$40!
Interface Real World (I)
•

GPIO

•

I2C

•

SPI

•

<Others>
Interface Real World (II)
•

Memory Mapped
•

/dev/mem
•

•

Kernel modules
•

•

Fast, needs root, dangerous!

Slow, doesn’t need root, easier, safer

Can Erlang help us?
Erlang/ALE
•

Actor

•

Library for

•

Embedded

https://github.com/esl/erlang_ale
Erlang (hearts) Embedded
•

Soft real time

•

Concurrency and Parallelism

•

Fault tolerant & Robust

•

Hot-code loading
•

(http://www.erlang-embedded.com/2013/10/minimal-downtime-in-flight-drone-firmware-upgrade-in-erlang/)
Architecture
•

Fix the mess
we saw earlier

•

Familiar
abstractions

•

Clean model
What works
•

GPIO and GPIO interrupts

•

Basic I2C and SPI

•

Erlang Solutions actively working on it
GPIO
A

{init, 17, output}

GPIO

pin 17
GPIO
A

B

{state, 17, high}

GPIO

{state, 17, low}

pin 17
{state, 17, high}

C
GPIO Supervisor
•

Replaces locks
•

•

Access Control, Mutual Exclusion

Safety constraints
•

Toggling, sequence detection, direction
control, etc.
Blink some LEDs
{ok, _} = gpio:start_link(?LED_PIN, output),
!

blink() ->

gpio:write(?LED_PIN, 1),

!

timer:sleep(1000),
!

gpio:write(?LED_PIN, 0),
!

timer:sleep(1000).
Blink some LEDs

•

http://bit.ly/18KP8xF
Interrupts
{ok, _} = gpio:start_link(?IN_PIN, input),
!

ok

= gpio:set_int(?IN_PIN, rising),

!

handle_info({gpio_interrupt, _Pin,
_Condition}, State) ->
blink().
1-wire
•

Creates a network of sensors all communicating
using 1 single wire

•

Great digital thermometer sensor available
•

DS18B20
Raspberry Pi & 1-wire
•

Kernel module
•

•

/sys/bus/w1/devices/28-0000044719d7/w1slave

=>
•

4b 01 4b 46 7f ff 0e 10 d8 : crc=d8 YES

4b 01 4b 46 7f ff 0e 10 d8 t=26125
Read temperature
•

read(<<A1:16,_,A2:16,_,A3:16,_,A4:16
,_,A5:16,_,A6:16,_,A7:16,_,A8:16,_,C
RC:16,_,$:,_,”crc=",CRC:
16,_,"YES",Rest0/binary>>

•

read(<<A1:16,_,A2:16,_,A3:16,_,A4:16
,_,A5:16,_,A6:16,_,A7:16,_,A8:16,_,C
RC:16," t=",Rest/binary>>

•

http://bit.ly/1cst0ah
Projects
•

Kegerator control

•

Boil Wort

•

Strike water, Hot Liquor Tank

•

Mash temperature

•

Fermentation Chamber
Control
Thank you
Links
•

https://github.com/esl/erlang_ale

•

http://www.erlang-embedded.com/

•

Blink LEDs: http://bit.ly/18KP8xF

•

Read Temperature: http://bit.ly/1cst0ah

Contenu connexe

Tendances

Raspberry pi 2 demo
Raspberry pi 2 demoRaspberry pi 2 demo
Raspberry pi 2 demoViet Nguyen
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015Leslie Carr
 
Grid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridGrid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridMikhail Levin
 
HPC Performance & Development Tuning tools for scientists to go parallel fast...
HPC Performance & Development Tuning tools for scientists to go parallel fast...HPC Performance & Development Tuning tools for scientists to go parallel fast...
HPC Performance & Development Tuning tools for scientists to go parallel fast...Intel IT Center
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA崇之 清水
 
Amazon Aurora の活用
Amazon Aurora の活用Amazon Aurora の活用
Amazon Aurora の活用崇之 清水
 

Tendances (9)

Raspberry pi 2 demo
Raspberry pi 2 demoRaspberry pi 2 demo
Raspberry pi 2 demo
 
What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015What is NetDevOps? How? Leslie Carr PuppetConf 2015
What is NetDevOps? How? Leslie Carr PuppetConf 2015
 
NFC and iOS11
NFC and iOS11NFC and iOS11
NFC and iOS11
 
Grid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium gridGrid Router – scalable and fault tolerant solution for Selenium grid
Grid Router – scalable and fault tolerant solution for Selenium grid
 
Glitch nix
Glitch nixGlitch nix
Glitch nix
 
HPC Performance & Development Tuning tools for scientists to go parallel fast...
HPC Performance & Development Tuning tools for scientists to go parallel fast...HPC Performance & Development Tuning tools for scientists to go parallel fast...
HPC Performance & Development Tuning tools for scientists to go parallel fast...
 
Selenium-Grid-Extras
Selenium-Grid-ExtrasSelenium-Grid-Extras
Selenium-Grid-Extras
 
Amazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKAAmazon Aurora の活用 - Developers.IO in OSAKA
Amazon Aurora の活用 - Developers.IO in OSAKA
 
Amazon Aurora の活用
Amazon Aurora の活用Amazon Aurora の活用
Amazon Aurora の活用
 

Similaire à Brewing ALE with Pi

Building an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneBuilding an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneSaúl Ibarra Corretgé
 
Windows 10 IoT Core for Raspberry Pi 2
Windows 10 IoT Core for Raspberry Pi 2Windows 10 IoT Core for Raspberry Pi 2
Windows 10 IoT Core for Raspberry Pi 2Stavros Kalapothas
 
Raspberrypi best ppt
Raspberrypi best ppt Raspberrypi best ppt
Raspberrypi best ppt SOMRAJ GAUTAM
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi IntroductionMichal Sedlak
 
Exploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with PythonExploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with PythonShahed Mehbub
 
Building an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneBuilding an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneSaúl Ibarra Corretgé
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsFrank Hunleth
 
Raspberry Pi Gaming Rig
Raspberry Pi Gaming RigRaspberry Pi Gaming Rig
Raspberry Pi Gaming RigDuc Le
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptxBLACKSPAROW
 
Nerves Project Intro to ErlangDC
Nerves Project Intro to ErlangDCNerves Project Intro to ErlangDC
Nerves Project Intro to ErlangDCFrank Hunleth
 
Using Telegram to interact with an LED Matrix
Using Telegram to interact with an LED MatrixUsing Telegram to interact with an LED Matrix
Using Telegram to interact with an LED Matrixxorduna
 
Raspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionRaspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionVatsal N Shah
 
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
R0boCamp2016  Гліб Вінніков  Home automation by ESP8266R0boCamp2016  Гліб Вінніков  Home automation by ESP8266
R0boCamp2016 Гліб Вінніков Home automation by ESP8266Lviv Startup Club
 

Similaire à Brewing ALE with Pi (20)

Building an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneBuilding an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware Phone
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Windows 10 IoT Core for Raspberry Pi 2
Windows 10 IoT Core for Raspberry Pi 2Windows 10 IoT Core for Raspberry Pi 2
Windows 10 IoT Core for Raspberry Pi 2
 
Raspberrypi best ppt
Raspberrypi best ppt Raspberrypi best ppt
Raspberrypi best ppt
 
Maker printouts
Maker printoutsMaker printouts
Maker printouts
 
Raspberry Pi Introduction
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
 
Functions on Kubernetes
Functions on KubernetesFunctions on Kubernetes
Functions on Kubernetes
 
Exploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with PythonExploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with Python
 
Building an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware PhoneBuilding an Open Source VoIP Hardware Phone
Building an Open Source VoIP Hardware Phone
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Embedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBotsEmbedded Erlang, Nerves, and SumoBots
Embedded Erlang, Nerves, and SumoBots
 
Raspberry Pi Gaming Rig
Raspberry Pi Gaming RigRaspberry Pi Gaming Rig
Raspberry Pi Gaming Rig
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Nerves Project Intro to ErlangDC
Nerves Project Intro to ErlangDCNerves Project Intro to ErlangDC
Nerves Project Intro to ErlangDC
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Using Telegram to interact with an LED Matrix
Using Telegram to interact with an LED MatrixUsing Telegram to interact with an LED Matrix
Using Telegram to interact with an LED Matrix
 
Raspbeery Pi : An Introduction
Raspbeery Pi : An IntroductionRaspbeery Pi : An Introduction
Raspbeery Pi : An Introduction
 
Embedded Objective-C
Embedded Objective-CEmbedded Objective-C
Embedded Objective-C
 
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
R0boCamp2016  Гліб Вінніков  Home automation by ESP8266R0boCamp2016  Гліб Вінніков  Home automation by ESP8266
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
 
Krupesh_Resume
Krupesh_ResumeKrupesh_Resume
Krupesh_Resume
 

Dernier

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 

Dernier (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 

Brewing ALE with Pi