Getting started with Microsoft .NET Gadgeteer

Creating Custom Devices
With .NET Gadgeteer
Steven Johnston,
University of Southampton / .Net Gadgeteer PM,
(v-stejo@microsoft.com),
Nicolas Villar, James Scott, Kerry Hammil,
Steve Hodges, Scarlet Schwiderski-Grosche.
Introduction
•
•
•
•
•
.Net Gadgeteer rapid prototyping platform
Hardware
Software
Project examples
A quick demo
Why custom devices?
• Enables research in the wild
Steve Hodges, Lyndsay Williams, Emma Berry, Shahram Izadi, James Srinivasan, Alex Butler, Gavin Smyth, Narinder Kapur and
Ken Wood, “SenseCam: a Retrospective Memory Aid”. In Dourish and A. Friday (Eds.), UbiComp 2006, pp. 177-193.
Y. Rogers, S. Price, G. Fitzpatrick, R. Fleck, E. Harris, H. Smith, C. Randell, H. Muller, C. O'Malley, D. Stanton, M. Thompson, and
M. Weal. 2004. Ambient wood: designing new forms of digital augmentation for learning outdoors. In Proceedings of the
2004 Conference on Interaction design and children: building a community (IDC '04).
William Gaver, Mark Blythe, Andy Boucher, Nadine Jarvis, John Bowers, and Peter Wright. 2010. The prayer companion:
openness and specificity, materiality and spirituality. In Proceedings CHI '10. pp. 2055-2064.
Different to prototyping, in the
traditional sense
• Custom research devices are not necessarily a
prototype for a future product.
• Need to be fully functional, and self-contained
Ideal Properties
• flexibility over device form factor as well as
the hardware and software;
• accessibility to new users and extensibility of
the platform;
• versatility to scale up to sophisticated
standalone devices and robust systems.
Broadening the Audience
.NET Gadgeteer has also proven of interest to:
– Educators
• Secondary (age 18 down to 14 or perhaps lower)
• Tertiary (from teaching to research)
– Hobbyists
• Growing community of “makers”
• Getting back to DIY computing
The .NET Gadgeteer Hardware
At the heart of every Gadgeteer project is a mainboard.
A mainboard is made up of a programmable processor, and a
number of sockets that Gadgeteer modules can plug into.
Modules, Modules, Modules
Sensors, Actuators, Networking, User Input,
Displays, Power, Extensibility, …
GHI Electronics
Spider Mainboard
Hydra Mainboard
Joystick
Button+LED
SD card
3.5” touchscreen
Camera
Ethernet
Multicolor LED
Potentiometer
WiFi
Bluetooth
Accelerometer
Xbee radio
Motor controller
Micro SD card
Music player
Sytech Designs
Nano Mainboard
4.3” touchscreen
Camera
Button+LED
Power supply
Ethernet
SD card
Accelerometer
Xbee radio
Serial 2 USB
Seeed Studio
Cellular Radio
GPS
Plant moisture sensor
Accelerometer
Gyroscope
Compass
Barometer
OLED display
Pulse oximeter
High-voltage relays
Current sensor
Galvanic skin response
DF Robot
Smart motor controller
Ultrasonic ranger
Line following sensor
Infrared distance sensor
Colour sensor
One type of cable
A Closer Look at a Mainboard
Power LED
Debug LED
Reset Button
Mainboard Socket Numbers
Mainboard Socket Types (Letters)
• If a module is connected to the wrong socket
type it won’t work (but it won’t damage
anything, either)
• Red modules supply power to the mainboard.
Only one red module should ever be connected
to the mainboard at any time.
Socket Type Example: Socket A
Socket Type Definition (Version 16)
USB Device
X
Y
A
C
D
PIN
1
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
PIN
2
+5V
+5V
+5V
+5V
+5V
PIN
3
GPIO!
GPIO!
AIN (G!)
GPIO!
GPIO!
Ethernet
E
+3.3V
+5V
[UN]
SD Card
F
H
I
K
O
P
S
T
U
R
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+3.3V
+5V
+5V
+5V
+5V
+5V
+5V
+5V
+5V
+5V
+5V
Manufacturer Specific
G
B
Z
+3.3V
+3.3V
+3.3V
DaisyLink Downstream*
*
+3.3V
TYPE
LETTER
3 GPIO
7 GPIO
Analog In
CAN
USB Host
I2C
UART+Handshaking
Analog Out
PWM
SPI
Touch
UART
LCD 1
LCD 2
LCD 3
GPIO!
GPIO!
GPIO!
GPIO!
GPIO!
GPIO!
GPIO!
[UN]
GPIO!
LCD R0
PIN
4
GPIO
GPIO
AIN (G)
TD (G)
DLED1
(OPT)
DAT0
D[UN]
TX (G)
GPIO
[UN]
GPIO
YU
TX (G)
LCD R1
PIN
5
GPIO
GPIO
AIN
RD (G)
D+
LED2
(OPT)
DAT1
D+
[UN]
RX (G)
AOUT
[UN]
GPIO
XL
RX (G)
LCD R2
PIN
6
[UN]
GPIO
GPIO
GPIO
GPIO
PIN
7
[UN]
GPIO
[UN]
[UN]
GPIO
PIN
8
[UN]
GPIO
[UN]
[UN]
[UN]
PIN
9
[UN]
GPIO
[UN]
[UN]
[UN]
PIN
10
GND
GND
GND
GND
GND
TX D-
TX D+
RX D-
RX D+
GND
CMD
DAT2
[UN]
[UN]
GPIO
[UN]
RTS
CTS
[UN]
[UN]
GPIO PWM (G)
CS
MOSI
YD
XR
GPIO
[UN]
LCD R3 LCD R4
DAT3
[UN]
SDA
[UN]
[UN]
PWM (G)
MISO
[UN]
[UN]
LCD VSYNC
CLK
[UN]
SCL
[UN]
[UN]
PWM
SCK
[UN]
[UN]
LCD HSYNC
GND
GND
GND
GND
GND
GND
GND
GND
GND
GND
+5V
+5V
+5V
LCD G0
LCD B0
[MS]
LCD G1
LCD B1
[MS]
LCD G2
LCD B2
[MS]
LCD G3
LCD B3
[MS]
LCD G4
LCD B4
[MS]
LCD G5
LCD EN
[MS]
BACKLIGHT
LCD CLK
[MS]
GND
GND
GND
+5V
GPIO!
GPIO
GPIO
[MS]
[MS]
[MS]
[MS]
GND
GPIO
A general-purpose digital input/output pin, operating at 3.3 Volts.
[UN]
Modules must not connect to this pin if using this socket type. Mainboards can support multiple socket types on one socket, as long
as individual pin functionalities overlap in a compatible manner. A pin from one socket type can overlap with a [UN] pin of another.
!
Interrupt-capable and software pull-up capable GPIO (the pull-up is switchable and in the range of 10,000 to 100,000 ohms).
*
Socket type * should not appear on a mainboard, only on DaisyLink modules. The [MS] pins on this socket type can optionally support
reflashing the firmware on the module.
Module Socket Labels
“X or Y”
Match socket type letters when connecting
modules to the mainboard
Software
• Based on the .NET Micro Framework (NETMF)
– Subset of .NET with some extra libraries to
support managed access to hardware WPF
– C#, VB coming soon.
– Remote debugging
• In addition:
– Gadgeteer Core Libraries (e.g Webserver)
– Visual Studio Graphical Designer
– Framework for mainboard and module drivers
SOURCE
Note: Italics denotes abstract class
Program
End User
Hardware
Manufacturers
Mainboard
Modules
Module,
Interfaces
GadgeteerCore
Mainboard,
Sockets, Pins
NETMF
.NET Micro Framework
Timer
Color
Pictures
Storage
Program
High level API with inline docs
Event driven rather than while(true)
Next level of abstraction easily accessed
Creating additional modules
Provided
templates
make it easy
…
…
including
building
installers
Module & Mainboard Builder’s Guides
Support for Custom Form Factors
Support for Custom Form Factors
Example Research Project: PreHeat
ASTRA: Atmospheric Science Through
Robotic Aircraft
• @SotonASTRA
• http://www.soton.ac.uk/~astra/
A simple example..
http://netmf.com/gadgeteer/
Index of hardware from any manufacturer
Example projects
Forums
http://gadgeteer.codeplex.com/
Project documentation
Open source for SW + HW
Core and Builder MSIs
Credits
Thanks to the following MS groups:
• Microsoft Research Connections are supporting us in reaching end
users particularly in education.
• The MSR Advanced Prototyping team built the Designer experience.
• The Garage provided validation and testing of the internal
prototype version of Gadgeteer.
And to the following individuals (in alphabetical order):
• Michael Ashby, Tambie Angel, Tom Bartindale, Dominik Bial, Tom
Blank, Carole Boelitz, Natalya Butterworth, Bruce Cleary, Mike
Dodaro, Nick Duffield, Tobias Fischer, John Helmes, Carlos Garcia
Jurado Suarez, Darren Gehring, Rachel Howard, Steven Johnston,
Stacey Kuznetsov, Bob Lockhart, ThuVan Pham, Aprameya Rao,
David Rizzi, John Sarik, Scarlet Schwiderski-Grosche, Craig
Shrimpton, Jim St. George, Stewart Tansley, Pablo Tapia, Stuart
Taylor, Curtis von Veh, Darren West, and Christian Winkler.
Conclusion
• .Net Gadgeteer is a rapid prototyping
platform
– Open hardware/software
– Extensible
• Rich programming environment
– Visual Studio, C#
– Remote debugging…
• Support for CAD and rapid physical enclosure
design.
SOMETHING SIMPLE:
A BASIC DIGITAL CAMERA WITH
.NET GADGETEER
•
•
•
Shutter button
Displays picture on screen
Stores picture in SD Card
©2011 Microsoft Corporation. All rights reserved.
This material is provided for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS
SUMMARY. Microsoft is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.