Running Ruby on a Raspberry PI
Ju Liu - @arkh4m
RubyDay Florence - 26 November 2016
🙌 HI!!! 🙌
I'm Ju 🙇🏻
Also known as @arkh4m
I'm an Italian 🇮🇹
Living in London 🇬🇧
And I love to climb ⛰
I'm here today for two reasons.
1) I wanted to visit Florence
2) I don't know embedded systems at all
I'm just a web developer 🌈
So Why This?
I like programming.
I wanted to do something in the real world.
As engineers, we like to get lost into infinite layers of abstract complexity.
I thought of a labyrinth of labyrinths, of one sinuous spreading labyrinth that would encompass the past and the future and in some way involve the stars
– Jorge Luis Borges
I wanted to go back and do something as simple as switching on a lightbulb.
By the way...
How many engineers does it take to change a lightbulb?
It's impossible. They are all too busy trying to design the perfect lightbulb.
Answer #1
One. Precisely, the only one who reads the lightbulb's fine manual.
Answer #2
Five. One to design a nuclear-powered light bulb that never needs changing, one to figure out how to power the rest of the world using that lightbulb, two to try to install it, and one to write the multi-core distributed architecture that controls the wall switch.
Answer #3
Why Ruby?
Well, you chose it!
Why a Raspberry PI?
Arduino Zero | Raspberry PI 3 | |
---|---|---|
Clock | 32-bit 32MHz | 64-bit 1.2GHz |
Cores | 1 | 4 |
RAM | 32 KB | 1'024'000 KB |
Flash | 256 KB | 16'384'000 KB |
Cost | 33£ | 29£ + 6£ |
What next?
1 Dual-Color LED
2 RGB LED Module
3 7-Color Auto-flash LED
4 Relay Module
5 Laser Emitter Module
6 Button Module
7 Tilt-Switch Module
8 Mercury Switch
9 IR Receiver Module
10 Buzzer Module
11 Reed Switch
12 Photo-interrupter
13 PCF8591
14 Rain Detection Module
15 Joystick PS2
16 Potentiometer Module
17 Hall Sensor
18 Thermistor Module
19 Sound Sensor
20 Photoresistor Module
21 Flame Sensor
22 Gas Sensor
23 IR Remote control
24 Touch Switch
25 Ultrasonic Ranging Module
26 DS18B20 Temperature Sensor
27 Rotary Encoder Module
28 Humiture Sensor
29 IR Obstacle Avoidance Module
30 I2C LCD1602
31 Barometer
32 MPU6050 Gyro Sensor
33 RTC DS1302
34 Tracking Sensor
What could I build?
Well, there is a movie from 1996 with Tom Cruise in it...
Hipster Standing Desk
Let's enhance!
Bulding Mission Impossible Intrusion Countermeasures in Ruby on a Raspberry PI
-
Laser beams
-
Noise detection
-
Vibration aware
-
Temperature sensor
Features
Let's do it!
🎊 Tada! 🎊
You can find the code here
Useful Links
-
The pi_piper project http://nerves-project.org
-
How to use a USB TTL console cable https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/overview
-
Sunfounder sensors code on github https://github.com/sunfounder/SunFounder_SensorKit_for_RPi2
-
DIY Elixir Robot http://www.cultivatehq.com/diy-elixir-robot/
Some awesome talks
-
Embedded Elixir in Action by Garth Hitchens https://www.youtube.com/watch?v=kpzQrFC55q4
-
Enhanced Embedded Systems with Nerves by Justin Schneck https://www.youtube.com/watch?v=118-g0ODfgg
-
Mixed Up With Nerves by Greg Mefford https://www.youtube.com/watch?v=YMVL4275Zog
-
How to Build a Slack-Controlled, Saxophone-Playing Robot by Paul Wilson https://www.youtube.com/watch?v=-MzJ-HxRcVI
Thanks! Questions?
Ju Liu @arkh4m
Running Ruby on a Raspberry PI
By arkh4m
Running Ruby on a Raspberry PI
- 1,287