DinoJS 2017 workshop with Kas Perch
The Internet of things (IoT) is the inter-networking of physical devices... and network connectivity which enable these objects to collect and exchange data... a "thing" is "an object of the physical world (physical things) or the information world (virtual things), which is capable of being identified and integrated into communication networks"
Experts estimate that the IoT will consist of about 30 billion objects by 2020.
-Wikipedia
enable_uart=1
login - defaults are username: `pi`, pw: `raspberry`
change your password
`passwd` and follow instructions
allow ssh, boot to config
`sudo raspi-config` and update settings
`sudo nano /etc/wpa_supplicant/wpa_supplicant.conf`
network={ ssid="Our SSID" psk="Our Password" }
P1-19 MOSI to LED to resistor to - rail
P1-11 17 to button AND resistor to - rail, + power rail to same side other leg of button
const Raspi = require('raspi-io')
const five = require('johnny-five')
const board = new five.Board({
io: new Raspi()
})
board.on('ready', () => {
let led = new five.Led('P1-19')
led.strobe()
let strobing = true
let button = five.Button('P1-11')
button.on('press', () => {
strobing ? led.stop().off() : led.strobe()
strobing = !strobing
})
});
this.repl.inject({ button, led })
This allows interaction with the button and led while the program is running, so for example you could type in the console:
led.stop.off() led.on()
Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity...
Serverless computing still requires servers. The name "serverless computing" is used because the server management and capacity planning decisions are completely hidden from the developer or operator. Serverless code can be used in conjunction with code deployed in traditional styles, such as microservices. Alternatively, applications can be written to be purely serverless and use no provisioned services at all.
-Wikipedia
module.exports.hello = (event, context, callback) => { let randomNumber = Math.ceil(Math.random() * 9) const response = { statusCode: 200, body: JSON.stringify({ numSeconds: randomNumber }), }; callback(null, response);
emilyplatzer.com
@emilyplatzer
github.com/craftninja
Source materials from @nodebotanist