The Internet of Things is exploding and it's a great time to join in: more and more devices like the Arduino, Netduino and Gadgeteer are becoming available. The question is, how do I get started?
We will look at what is available in terms of popular hardware for building your Thing, and a demo of how to develop for the Arduino, followed by an introduction to the Gadgeteer and .Net Micro Framework, hopefully finishing up with a fairly simple but connected Gadgeteer based Thing (Wifi Allowing!).
2. A Brief Introduction to Me
• Stephen Harrison @TinamousSteve
• 20 years ago connecting blood gas analysers using
RS232 to Q-Pro
• C# Contractor developing connectivity solutions for
medical devices.
• Founder of Tinamous.com
• A Private Twitter like platform for People and Things.
3. Aim
• Introduction to IoT
• Look at some embedded platforms ideal for IoT
• Introduction to the world of Arduino
• See how to develop a Thing using an Arduino
• Introduction to the Gadgeteer
• Getting started coding and debug the Gadgeteer
4. Internet of Things
• What is a (IoT) Thing?
• Major Hype
• At the Peak of Inflated Expectations
• Next stop…
• Trough of Disillusionment
• Twitter -> #IoT #Lots!
• Large Maker community
• Developing hardware can be great fun
• But also a special kind of hell…
5. Selecting a board?
• Real time OS
• Power
• Fairy dust, Battery, Solar, USB, PoE, Wall Wart?
• Internet
• Wired, WiFi, BLE, XBee, SD Card
• Infield updates
• Can you update the code when deployed?
• 5V / 3V3 IO
• Component/shield compatibility
• Processor and Ram
• Enclosure
6. The Arduino
• Main form factors
• Standard – Note the wonky pinout!
• Mini
• Due/Mega
• Many other (LilyPad / Nano / Fio)
• Uses stackable shields to extend functionality
• Boot loader so it is easy to connect and program.
• Plug in USB and go.
7. Arduino Uno R3
• 16MHz
• 32KB Flash
• 2k SRAM
• 1KB EEPROM
• 14 Digital IO
• LEDs, Switches, etc.
• 40mA per IO Pin
• 6 PWM
• 6 Analog Inputs
• Light, temperature etc.
• 10 bits 4.9mV resolution
• No on-board Ethernet/WiFi
• £18
8. Arduino Yún
• Built in Ethernet and WiFi
• Supports Power over Ethernet.
• 802.3af – 15W – 12.5W usable.
• Has a second processor running OpenWrt
• 16MHz + 400MHz
• 2.5K + 64MB Ram
• 20x 5V 40mA IO just like the Uno.
• £46
9. Arduino – Custom Versions
• Open source hardware based on the Amtel Mega
• Download Schema & PCB design from Arduino.cc
• Very simple to make your own board, ATmega328
available in through hole version.
• Examples:
• Rapiro
• 3D Printers & CNC
• Seeduino Stalker
• Standalone Relay
11. Raspberry Pi
• Hopefully doesn’t need to much of an introduction!
• Checkout CamJam.me and PiWars.org – 6th December in Cambridge.
• 700MHz CPU
• 512MB
• On-board Ethernet
• HDMI
• USB Host (WiFi, Mouse, Keyboard etc.)
• 40Way header for expansion (HAT)
• 8 GPIO
• UART, I2C, SPI support.
• Power (3v3 and 5v)
• No Analog (ADC or DAC)
• Not real time
• £24
Photo: http://www.raspberrypi.org/
12. Spark Core
• Cortex M3 (32Bit, 82MHz)
• 128KB Flash, 20KB ram
• WiFi only
• Spark Web IDE
• Node.js, Ruby, Python and more!
• Command line interface
• Optional self hosting
• 8 Digital IO
• 8 Analog
• £34
• https://www.spark.io/
14. Teensy
• Cortex M4 – 72 MHz
• 64KB Ram
• 256K Flash
• Great IO
• 9 Touch
• 34 Digital IO
• 21 Analog Inputs (2 ADCs)
• 3v3. Most pins 5V tolerant
• 12 Bit DAC
• CAN Bus
• Supported by Arduino IDE
• No on-board internet
• £18
15. Microsoft and IoT
• Microsoft developed a Smart Watch (ca. 2004!)
• Are smart watches cool yet?
• SPOT watch became .Net Micro Framework
• .Net Micro Framework went open source
• .Net Micro Framework + Arduino form factor = ?
16. Netduino
• STMicro 168MHz Cortex M4
• 384KB Flash + 100KB RAM
• 10M wired Ethernet
• 20 IO (14 Digital + 6 Analog)
• 25mA per pin
• 3v3 but 5V tolerant
• 2 UARTS
• 6 PWM
• Open software and hardware
• £38
• http://Netduino.com
17. Gadgeteer
• MSR Cambridge
• .Net Micro Framework platform
• Standard rules for sockets and boards
• Boards from various companies:
• GHI Electronics
• Mountaineer
• Solderless design
• Some connector boards
• 10 Pin IDC connector.
• Not 0.1” pitch
• Open Source
18. FEZ Cerberus
• 168MHz Cortex M4
• 384KB Flash
• 104K Ram
• 8 Sockets
• 44 GPIO
• 2 UARTS
• 9 Analog
• Doesn’t support WiFi module
• No native Ethernet
• No RGBT display
• Open Source Hardware
• £15
• https://www.ghielectronics.com/catalog/product/349
19. FEZ Spider
• 72MHz ARM7
• 2.5MB Flash
• 11MB Ram
• 14 Sockets
• 74 GPIO
• 6 Analog
• 4 UART
• Touch Display Support (RGB+T)
• Native Ethernet support
• £75 (Now $60 from GHI)
• https://www.ghielectronics.com/catalog/product/269
20. So many other IoT boards…
• Probably a new one since I started!
• Microsoft introducing new boards
• Sharks Cove
• MinnowBoard Max
• Intel
• TI
• Kickstarter
• Many more Arduino variants
• Find the one(s) that works for you!
• You can use more than one in a project
Picture stolen from minnowboard.org
21. Arduino Coding
• Based on Processing (C/C++)
• Pointers!
• Arduino IDE.
• Plugins for Visual Studio & Eclipse
• Getting Started
• Software: 10 Print “Hello World”
• Hardware: BlinkLED();
• IoT: ReadTemperature();
• Example: Hello World++
• NeoPixel LEDs
• Single signal wire + Power
• But… VERY timing sensitive – needs RTOS
24. Gadgeteer Coding
• C# and VB.Net
• .Net Micro Framework
• Similar to .Net 1.x
• No Generics, Nullables (int?) or Anonymous types
• Open Sourced on CodePlex
• Very limited functionality
• No NUnit support
• Uses VS2012
• R# works
• NuGet works
• Not real time
• Uses GC
• Can’t drive some things like NeoPixels
25. Gadgeteer Example
• Automated Sprinkler System
• Use water from water butt
• Water when ground is dry
• Water only when dark
• Or when instructed from Tinamous message
• Record Moisture and Light levels
• VS2012 + GHI SDK + .Net Micro Framework 4.3
• FEZ Cerberus board with:
• X1 Relay
• DP USB Client Power
• Moisture Sensor
• Light Sensor
• ENC28 Ethernet
27. Enhance the Sprinkler
• Check if it’s going to rain in the next 2 hours
• Internet weather service
• Netatmo API – see if it is raining locally
• Measure humidity
• Multiple moisture sensors
• Measure water level in water butt
• Top-up if needed from tap.
• Water is it is about to over flow
• Measure Temperature, Humidity, UV levels etc.
• Monitor soil chemistry (pH etc.)
• Add dosages of chemicals as needed.
28. Summary
• We looked at some of the boards available
• Made a Arduino project
• Made a Gadgeteer project