IoTfor
Software Developers
@OrestesCA
orestes@orestes.io
Paradigm shift
- Corporations
- Personal
- Devices
IoT
- Dedicated use
- Connected
- Data emitters
Why?
Fun & profit
Project ideas
- Feed the baby
- Feed the fish
- Water the plants
- Destroy humanity
- Charm humanity and enslave them
I'm sold!
How?
When?
What?
...
Guts
Sensors
Guts
Actuators
Guts
- Sensors
- Actuators
- Controllers
Controllers
Systems thinking
Small
Platforms
Arduino
- Open Hardware
- Prototyping
- Compiled languages
Raspberry Pi
- Smallest computer
- Computing
- Interpreted languages
ESP 8266
- Arduino-compatible
- Wi-Fi Manager, Web Server, mDNS
- < $10
Getting started
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
int pinArray[] = {2, 3, 4, 5, 6, 7};
int count = 0;
int timer = 100;
void setup(){
// we make all the declarations at once
for (count=0;count<6;count++) {
pinMode(pinArray[count], OUTPUT);
}
}
void loop() {
for (count=0;count<6;count++) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer);
}
for (count=5;count>=0;count--) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer);
}
}
Knight Rider
Communication
Serial.begin();
HTTP
All together
(now)
RS232 + firmware = ?
console.log('Starting Blink sample...');
// import gpio module
var gpio = require('gpio');
// LED0 is one of the onboard LEDs on the Arduino 101
// 'out' mode is default, could be left out
var pin = gpio.open({pin: 'LED0', mode: 'out', activeLow: true});
// remember the current state of the LED
var toggle = 0;
// schedule a function to run every 1s (1000ms)
setInterval(function () {
toggle = 1 - toggle;
pin.write(toggle);
}, 1000);
JavaScript
FTW
Learning
http://fritzing.org/learning/
Genuino Starter Kit
Links
Links
IoT for Software Developers
By Orestes Carracedo
IoT for Software Developers
- 1,594