SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
We Power
Connected Things
Hardware development at the speed of software. www.wildernesslabs.co
slideshare.net/bryancostanich
The Hardware Revolution,
10 years ago, the iPhone launched.
Today, we have cars that drive themselves.
10 years from now, nearly every new
device will be connected, and much of
them will be automated.
Consumers will demand sophisticated
hardware. June Oven, Tovala, and other.
3 types of IoT: Consumer,
Commercial, and Industrial
GE predicts $60T in Industrial IoT
alone in the next 15 years.
a career opportunity.
© 2018, Wilderness Labs, Inc.
Future Tech
Connected fridge of tomorrow:
- Inventory + automated grocery ordering.
- Meal & diet plan, recipe assistant.
- User recognition, experience tailoring.
- Allergy, food expiration, etc. warnings.
- Integration with oven, microwave, etc.
Winning Commercial & Industrial IoT devices will be just as sophisticated.
© 2018, Wilderness Labs, Inc.
Microcontrollers will make the revolution possible.
Commodity chips. $2-$10
Low-energy, high-performance.
General Purpose Input-Output (GPIO)
Digital + Analog
Built-in Protocol Support (SPI, I2C, Serial,
CAN, and others)
Analog-to-Digital (ADC) Converters
Digital-to-Analog Converters
Gateway Connectivity (BLE, WiFi, others)
Real IoT is powered by microcontrollers (MCUs).
Netduino = Arduino form factor running the
.Net MicroFramework.
Visual Studio (Windows + Mac)
Debugging, events, etc.
Building a vNext connected things platform.
Prototype with Netduino.
Go to market with Meadow.
meadow
© 2018, Wilderness Labs, Inc.
developer.wildernesslabs.co
community.wildernesslabs.co
Demo
Connected Dehydrator
household mains electricity
PID controllers
LCD menu UI
web API
mobile app
Hacking Connected Appliances
Start building the hardware of tomorrow, today.
Enclosure
github.com/wildernesslabs/3D_Print_Designs
Netduino
Breadboard
Relay
Power Distribution
LCD + Rotary Encoder
Nugetized hardware
and peripheral
framework API
Power Control Household electricity (110V/240V) is
controlled by a relay.
Relays are electromechanical and isolate
circuits.
Controlled by a simple on/off via a digital
I/O pin.
Baseboard @ 3D_Print_Designs repo
OutputPort relay =
new OutputPort(Pins.GPIO_PIN_D2, false);
relay.Write(true);
var relay = new Relay(N.Pins.GPIO_PIN_D1);
relay.IsOn = true;
relay.Toggle()
Netduino.Foundation:
TextDisplayMenu
JSON-powered
Use with any LCD via Netduino.Foundation (GPIO,
I2C, Serial, SPI)
Navigate with IRotaryEncoder, or IButtons.
Editable Items.
Using
TextDisplayMenu
protected void InitializeMenu()
{
// initialize menu
_menu = new Menu(_display, _encoder,
Resources.GetBytes(Resources.BinaryResources.menu),
true);
_menu.ValueChanged += HandleMenuValueChange;
_menu.Selected += HandleMenuSelected;
_menu.Exited += (s, e) => {
this._inMenu = false;
this.DisplayInfoScreen();
};
_menu.UpdateItemValue("power", "Turn on");
}
protected void HandleMenuSelected(object sender,
MenuSelectedEventArgs e)
{
switch (e.Command)
{
case "power":
Debug.Print("menu power");
TogglePower();
break;
case "Exit":
this.DisplayInfoScreen();
break;
}
}
protected void HandleMenuValueChange(object sender,
ValueChangedEventArgs e)
{
switch (e.ItemID) {
case "temperature":
_targetTemp = (float)(double)e.Value; //smh
_dehydrator.TargetTemperature = _targetTemp;
break;
case "timer":
_runTime = (TimeSpan)e.Value;
break;
}
}
PID
Proportional, Integral, Derivative
StandardPIDController
IdealPIDController
Netduino.Foundation
PID Guide
PID in Action - Controller ctor
public DehydratorController (AnalogTemperature tempSensor, SoftPwm heater, Relay fan,
ITextDisplay display)
{
_tempSensor = tempSensor;
_heaterRelayPwm = heater;
_fanRelay = fan;
_display = display;
_pidController = new StandardPidController();
_pidController.ProportionalComponent = .5f; // proportional
_pidController.IntegralComponent = .55f; // integral time minutes
_pidController.DerivativeComponent = 0f; // derivative time in minutes
_pidController.OutputMin = 0.0f; // 0% power minimum
_pidController.OutputMax = 1.0f; // 100% power max
_pidController.OutputTuningInformation = false;
}
PID in Action - Temperature Thread
protected void StartRegulatingTemperatureThread()
{
_tempControlThread = new Thread(() => {
while (this._running) {
_pidController.ActualInput = _tempSensor.Temperature;
_pidController.TargetInput = this.TargetTemperature;
var powerLevel = _pidController.CalculateControlOutput();
this._heaterRelayPwm.DutyCycle = powerLevel;
// sleep for a while.
Thread.Sleep(_powerUpdateInterval);
}
});
_tempControlThread.Start();
}
Web Server
Purpose-built for Netduino.
Modern, RESTful Web API/
Built-in JSON Support.
Maple Web Server Host
public delegate void TurnOnHandler(int targetTemp);
public event TurnOnHandler TurnOn = delegate { };
public void postTurnOn() {
try {
int targetTemp = 0;
var prm = "targetTemp";
if (this.Body[prm] == null && this.Form[prm] == null && this.QueryString[prm] == null) {
StatusResponse(ContentTypes.Application_Text, 400, prm + " is required");
return;
}
try {
var temp = this.Body[prm] ?? this.Form[prm] ?? this.QueryString[prm];
targetTemp = int.Parse(temp.ToString());
} catch(Exception ex) {
StatusResponse(ContentTypes.Application_Text, 400, "Invalid " + prm + " value");
}
TurnOn(targetTemp);
StatusResponse(200);
} catch (Exception ex) {
StatusResponse(ContentTypes.Application_Text, 500, ex.Message);
}
}
get:/Status
post:/TurnOn
post:/TurnOff
Dehydrator App Solution Architecture
Main() launches App.
App instantiates peripherals
Features managed by
controllers.
Xamarin Mobile App
Xamarin.Forms + HttpClient
async private Task<bool> PowerCommand(string command) {
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase);
var response = await client.PostAsync(command, null);
if (response.IsSuccessStatusCode) {
if (command == "turnon") {
App.ApplianceStatus = ApplianceStatus.On;
} else {
App.ApplianceStatus = ApplianceStatus.Off;
}
}
return response.IsSuccessStatusCode;
}
What future tech will you build?
Bay Area MakerFaire next week! May 18th-20th
Hardware Hackers Portland June (date TBD)
PADNUG July 3rd
Hardware Hackers July Roadshow (BC, Seattle, Portland, SF, LA,
Phoenix).
Upcoming Events
Thanks.
www.wildernesslabs.co
Code here
newsletter: bit.ly/2rBfP4Y
slideshare.net/bryancostanich
Github.com/WildernessLabs/Netduino_Samples/Netduino.Foundation/

Mais conteúdo relacionado

Semelhante a Teardown Conference: hacking appliances with netduino + xamarin

Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Aleksander Piotrowski
 
IRJET- Smart Power Optimization with IoT
IRJET-  	  Smart Power Optimization with IoTIRJET-  	  Smart Power Optimization with IoT
IRJET- Smart Power Optimization with IoTIRJET Journal
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2John Staveley
 
Android Lollipop internals and inferiority complex droidcon.hr 2015
Android Lollipop internals and inferiority complex droidcon.hr 2015 Android Lollipop internals and inferiority complex droidcon.hr 2015
Android Lollipop internals and inferiority complex droidcon.hr 2015 Aleksander Piotrowski
 
iot1presentation-191219142803.pdf
iot1presentation-191219142803.pdfiot1presentation-191219142803.pdf
iot1presentation-191219142803.pdfBharathReddy615859
 
IoT Based Home Automation System Presantation
IoT Based Home Automation System PresantationIoT Based Home Automation System Presantation
IoT Based Home Automation System PresantationFarhan Ahmed Rahee
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Alessandro Molina
 
Iot for smart agriculture
Iot for smart agricultureIot for smart agriculture
Iot for smart agricultureAtit Patumvan
 
IoT based home automation
IoT based home automationIoT based home automation
IoT based home automationEyaminulHoq
 
Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...The Internet of Things Methodology
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldStefano Sanna
 
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Codemotion
 
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Codemotion
 
How To Electrocute Yourself using the Internet
How To Electrocute Yourself using the InternetHow To Electrocute Yourself using the Internet
How To Electrocute Yourself using the InternetAlexander Roche
 
Smart glasses report for computer enginner
Smart glasses report for computer enginnerSmart glasses report for computer enginner
Smart glasses report for computer enginnerJayMusical
 
Zen alert - Why You Need and How It Works
Zen alert - Why You Need and How It WorksZen alert - Why You Need and How It Works
Zen alert - Why You Need and How It WorksZenAlert
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in actionStefano Sanna
 
Intel galileo gen 2
Intel galileo gen 2Intel galileo gen 2
Intel galileo gen 2srknec
 
Da Arduino ad Android_ illumina il Natale con il BLE
Da Arduino ad Android_ illumina il Natale con il BLEDa Arduino ad Android_ illumina il Natale con il BLE
Da Arduino ad Android_ illumina il Natale con il BLEinfogdgmi
 

Semelhante a Teardown Conference: hacking appliances with netduino + xamarin (20)

Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015
 
IRJET- Smart Power Optimization with IoT
IRJET-  	  Smart Power Optimization with IoTIRJET-  	  Smart Power Optimization with IoT
IRJET- Smart Power Optimization with IoT
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
 
Android Lollipop internals and inferiority complex droidcon.hr 2015
Android Lollipop internals and inferiority complex droidcon.hr 2015 Android Lollipop internals and inferiority complex droidcon.hr 2015
Android Lollipop internals and inferiority complex droidcon.hr 2015
 
iot1presentation-191219142803.pdf
iot1presentation-191219142803.pdfiot1presentation-191219142803.pdf
iot1presentation-191219142803.pdf
 
IoT Based Home Automation System Presantation
IoT Based Home Automation System PresantationIoT Based Home Automation System Presantation
IoT Based Home Automation System Presantation
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2
 
Iot for smart agriculture
Iot for smart agricultureIot for smart agriculture
Iot for smart agriculture
 
IoT based home automation
IoT based home automationIoT based home automation
IoT based home automation
 
Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...Getting Started with the Internet of Things  - Allianz Hackrisk Hackathon 29/...
Getting Started with the Internet of Things - Allianz Hackrisk Hackathon 29/...
 
Android Things, from mobile apps to physical world
Android Things, from mobile apps to physical worldAndroid Things, from mobile apps to physical world
Android Things, from mobile apps to physical world
 
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni...
 
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
Android Things, from mobile apps to physical world by Giovanni Di Gialluca an...
 
IoT with Arduino
IoT with ArduinoIoT with Arduino
IoT with Arduino
 
How To Electrocute Yourself using the Internet
How To Electrocute Yourself using the InternetHow To Electrocute Yourself using the Internet
How To Electrocute Yourself using the Internet
 
Smart glasses report for computer enginner
Smart glasses report for computer enginnerSmart glasses report for computer enginner
Smart glasses report for computer enginner
 
Zen alert - Why You Need and How It Works
Zen alert - Why You Need and How It WorksZen alert - Why You Need and How It Works
Zen alert - Why You Need and How It Works
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in action
 
Intel galileo gen 2
Intel galileo gen 2Intel galileo gen 2
Intel galileo gen 2
 
Da Arduino ad Android_ illumina il Natale con il BLE
Da Arduino ad Android_ illumina il Natale con il BLEDa Arduino ad Android_ illumina il Natale con il BLE
Da Arduino ad Android_ illumina il Natale con il BLE
 

Mais de bryan costanich

Hacking your coffee maker; building a connected appliance with Netduino and X...
Hacking your coffee maker; building a connected appliance with Netduino and X...Hacking your coffee maker; building a connected appliance with Netduino and X...
Hacking your coffee maker; building a connected appliance with Netduino and X...bryan costanich
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patternsbryan costanich
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarinbryan costanich
 
Going mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar StudentsGoing mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar Studentsbryan costanich
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studiobryan costanich
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarinbryan costanich
 

Mais de bryan costanich (8)

Hacking your coffee maker; building a connected appliance with Netduino and X...
Hacking your coffee maker; building a connected appliance with Netduino and X...Hacking your coffee maker; building a connected appliance with Netduino and X...
Hacking your coffee maker; building a connected appliance with Netduino and X...
 
Futures in Computing
Futures in Computing Futures in Computing
Futures in Computing
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
 
C# rocks
C# rocksC# rocks
C# rocks
 
Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
Going mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar StudentsGoing mobile - A Technical Job Prep for Vassar Students
Going mobile - A Technical Job Prep for Vassar Students
 
Cross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual StudioCross-Platform Mobile Development in Visual Studio
Cross-Platform Mobile Development in Visual Studio
 
Cross Platform Development with Xamarin
Cross Platform Development with XamarinCross Platform Development with Xamarin
Cross Platform Development with Xamarin
 

Último

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Último (20)

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

Teardown Conference: hacking appliances with netduino + xamarin

  • 1. We Power Connected Things Hardware development at the speed of software. www.wildernesslabs.co slideshare.net/bryancostanich
  • 2. The Hardware Revolution, 10 years ago, the iPhone launched. Today, we have cars that drive themselves. 10 years from now, nearly every new device will be connected, and much of them will be automated. Consumers will demand sophisticated hardware. June Oven, Tovala, and other. 3 types of IoT: Consumer, Commercial, and Industrial GE predicts $60T in Industrial IoT alone in the next 15 years. a career opportunity. © 2018, Wilderness Labs, Inc.
  • 3. Future Tech Connected fridge of tomorrow: - Inventory + automated grocery ordering. - Meal & diet plan, recipe assistant. - User recognition, experience tailoring. - Allergy, food expiration, etc. warnings. - Integration with oven, microwave, etc. Winning Commercial & Industrial IoT devices will be just as sophisticated. © 2018, Wilderness Labs, Inc.
  • 4. Microcontrollers will make the revolution possible. Commodity chips. $2-$10 Low-energy, high-performance. General Purpose Input-Output (GPIO) Digital + Analog Built-in Protocol Support (SPI, I2C, Serial, CAN, and others) Analog-to-Digital (ADC) Converters Digital-to-Analog Converters Gateway Connectivity (BLE, WiFi, others) Real IoT is powered by microcontrollers (MCUs).
  • 5. Netduino = Arduino form factor running the .Net MicroFramework. Visual Studio (Windows + Mac) Debugging, events, etc. Building a vNext connected things platform. Prototype with Netduino. Go to market with Meadow. meadow © 2018, Wilderness Labs, Inc.
  • 8. household mains electricity PID controllers LCD menu UI web API mobile app Hacking Connected Appliances Start building the hardware of tomorrow, today.
  • 11. Power Control Household electricity (110V/240V) is controlled by a relay. Relays are electromechanical and isolate circuits. Controlled by a simple on/off via a digital I/O pin. Baseboard @ 3D_Print_Designs repo OutputPort relay = new OutputPort(Pins.GPIO_PIN_D2, false); relay.Write(true); var relay = new Relay(N.Pins.GPIO_PIN_D1); relay.IsOn = true; relay.Toggle() Netduino.Foundation:
  • 13. JSON-powered Use with any LCD via Netduino.Foundation (GPIO, I2C, Serial, SPI) Navigate with IRotaryEncoder, or IButtons. Editable Items. Using TextDisplayMenu protected void InitializeMenu() { // initialize menu _menu = new Menu(_display, _encoder, Resources.GetBytes(Resources.BinaryResources.menu), true); _menu.ValueChanged += HandleMenuValueChange; _menu.Selected += HandleMenuSelected; _menu.Exited += (s, e) => { this._inMenu = false; this.DisplayInfoScreen(); }; _menu.UpdateItemValue("power", "Turn on"); } protected void HandleMenuSelected(object sender, MenuSelectedEventArgs e) { switch (e.Command) { case "power": Debug.Print("menu power"); TogglePower(); break; case "Exit": this.DisplayInfoScreen(); break; } } protected void HandleMenuValueChange(object sender, ValueChangedEventArgs e) { switch (e.ItemID) { case "temperature": _targetTemp = (float)(double)e.Value; //smh _dehydrator.TargetTemperature = _targetTemp; break; case "timer": _runTime = (TimeSpan)e.Value; break; } }
  • 16. PID in Action - Controller ctor public DehydratorController (AnalogTemperature tempSensor, SoftPwm heater, Relay fan, ITextDisplay display) { _tempSensor = tempSensor; _heaterRelayPwm = heater; _fanRelay = fan; _display = display; _pidController = new StandardPidController(); _pidController.ProportionalComponent = .5f; // proportional _pidController.IntegralComponent = .55f; // integral time minutes _pidController.DerivativeComponent = 0f; // derivative time in minutes _pidController.OutputMin = 0.0f; // 0% power minimum _pidController.OutputMax = 1.0f; // 100% power max _pidController.OutputTuningInformation = false; }
  • 17. PID in Action - Temperature Thread protected void StartRegulatingTemperatureThread() { _tempControlThread = new Thread(() => { while (this._running) { _pidController.ActualInput = _tempSensor.Temperature; _pidController.TargetInput = this.TargetTemperature; var powerLevel = _pidController.CalculateControlOutput(); this._heaterRelayPwm.DutyCycle = powerLevel; // sleep for a while. Thread.Sleep(_powerUpdateInterval); } }); _tempControlThread.Start(); }
  • 18. Web Server Purpose-built for Netduino. Modern, RESTful Web API/ Built-in JSON Support.
  • 19. Maple Web Server Host public delegate void TurnOnHandler(int targetTemp); public event TurnOnHandler TurnOn = delegate { }; public void postTurnOn() { try { int targetTemp = 0; var prm = "targetTemp"; if (this.Body[prm] == null && this.Form[prm] == null && this.QueryString[prm] == null) { StatusResponse(ContentTypes.Application_Text, 400, prm + " is required"); return; } try { var temp = this.Body[prm] ?? this.Form[prm] ?? this.QueryString[prm]; targetTemp = int.Parse(temp.ToString()); } catch(Exception ex) { StatusResponse(ContentTypes.Application_Text, 400, "Invalid " + prm + " value"); } TurnOn(targetTemp); StatusResponse(200); } catch (Exception ex) { StatusResponse(ContentTypes.Application_Text, 500, ex.Message); } } get:/Status post:/TurnOn post:/TurnOff
  • 20. Dehydrator App Solution Architecture Main() launches App. App instantiates peripherals Features managed by controllers.
  • 21. Xamarin Mobile App Xamarin.Forms + HttpClient async private Task<bool> PowerCommand(string command) { HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase); var response = await client.PostAsync(command, null); if (response.IsSuccessStatusCode) { if (command == "turnon") { App.ApplianceStatus = ApplianceStatus.On; } else { App.ApplianceStatus = ApplianceStatus.Off; } } return response.IsSuccessStatusCode; }
  • 22. What future tech will you build?
  • 23. Bay Area MakerFaire next week! May 18th-20th Hardware Hackers Portland June (date TBD) PADNUG July 3rd Hardware Hackers July Roadshow (BC, Seattle, Portland, SF, LA, Phoenix). Upcoming Events