SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
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/

Más contenido relacionado

Similar 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
 

Similar 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
 

Más 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
 

Más 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

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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

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
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

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