Simon Ford
Elektor Live!mbed Workshop
1
Outline
• Introduction
• Hello World!– Get you in control of the hardware...
• Walkthrough Example!– A feel for how things work...
• Workshop!– Time to experiment...
2
Before we start!
• Check that...– you have an mbed– you have a laptop– you have a working internet connection
3
• Microcontrollers are getting cheap– 32-bit ARM Cortex-M3 Microcontrollers @ $1!
• Microcontrollers are getting powerful– Lots of processing, memory, I/O in one package
• Microcontrollers are getting interactive – Internet connectivity, new sensors and actuators
• Lots of new opportunities for microcontrollers!
What’s happening to Microcontrollers?
Sydney Powerhouse Museum
– We’re now at the same tipping point with microcontrollers
– Ideas come from anywhere, need prototyping to test them
Microcontrollers are a great solution, looking for problems!
Eureka!If I could automate feeding my pigs, I’d be able to sleep in!
Eureka!If I could automate feeding my pigs, I’d be able to sleep in!
Eureka!I could use my
electronics skills to help... pig feeding!
Eureka!I could use my
electronics skills to help... pig feeding!
Rapid Prototyping
• Rapid Prototyping helps industries invent products
• We want prototyping with electronics to keep pace!– Let you prototype control, communication, interaction too
3D Moulding 3D Printing 2D/3D Design Web Frameworks
So we built mbed!
• Fastest way to start with an ARM microcontroller– Plug ‘n’ Play Hardware, Online Compiler
– Make picking up and working with a microcontroller fast!
What is mbed?
• Designed for rapid prototyping by a wide audience– Prototyping form-factor, High-level Library APIs
– Help you invent new products with microcontrollers!
What is mbed?
• Integrated mbed.org developer site and community– Online resources, tools for support and collaboration
– Help to build an active, supportive developer community!
What is mbed?
mbed NXP LPC1768 Hardware
12
What is the LPC1768 Microcontroller?
13
NXP LPC1768ARM Cortex-M3
100MHz512KB FLASH
64KB RAM
ARM Cortex-M332-bit MCU Core
Thumb-2 Instruction Set3-stage, Modified HarvardNVIC (Nested Interrupts)
Getting started...
Hello World!
14
Hello World! (1)
1. Plug it in2. ...3. Download and run your first “Hello World!” binary!
15
Hello World! (2)
1. Click the compiler link2. ...3. Compile and run your first “Hello World!” binary!
16
Hello World! (3)
1. Try modifying the code a bit Flash a different LED, change the speed, make a new pattern
2. ...3. Compile and run your own “Hello World!” binary!
17
A feel for how things work...
Walkthrough Example!
18
Walkthrough Example
• Make a simple datalogger– AnalogIn for reading analog values– LocalFileSystem for storing data to files
19
Time to experiment...
Workshop!
20
Our experience of workshops
• Everyone learns differently, and at a varying pace• Everyone has different levels and areas of experience
21
Our strategy for workshops
• Make equipment and resources available
• Let you explore what you want, at your own pace
• Use the mbed Handbook and Cookbook for guidance
• Provide support to you as you need it
22
Components to experiment with!
23
Components to experiment with!
24
Breakout Boards!
– Cool Components Breakout, Starboard Orange Breakout
25
m3pi Robots!
– Line sensors for linefollowers, Bluetooth for remote control
26
Use the Handbook and Cookbook...
Step-by-step introductory project
• For absolute beginners• An extract from:
ARM microcontrollers, Part 135 projects for beginnersBy Bert Van Dam
• Simple AnalogIn Experiments
28
Workshop Rules
• Experiment with whatever components you want– Some things are more complex than others; start simple
• Be considerate of others– Please return all the components as you finish with them
• Don’t be afraid to ask for help or guidance– We’ve sat everyone next to an assistant
• Go for it!
29
NXP mbed Design Challenge
Develop a product prototype, reusable library or reference design, share it on http://mbed.org, and
help others build their prototypes even faster!
Anyone with an mbed NXP LPC1768 can enter! http://www.circuitcellar.com/nxpmbeddesignchallenge
30
Prize pool of
$10,000!
Prize pool of
$10,000!