Important update: Arm Announces End of Life Timeline for Mbed. This site will be archived in July 2026. Read the full announcement.
mbed application board
Table of Contents
The new application board has been designed to enable the maximum number of potential experiments and projects, with the minimum footprint.
Although that there are 2x20 way headers for the mbed for jumper wiring pins off-board, it's a fairly well encapsulated platform.
Where to buy¶
Feature list¶
- 128x32 Graphics
- 5 way joystick
- 2 x Potentiometers
- 3.5mm Audio jack (Analog Out)
- Speaker, PWM Connected
- 3 Axis +/1 1.5g Accelerometer
- 3.5mm Audio jack (Analog In)
- 2 x Servo motor headers
- RGB LED, PWM connected
- USB-mini-B Connector
- Temperature sensor
- Socket for for Xbee (Zigbee) or RN-XV (Wifi)
- RJ45 Ethernet conenctor
- USB-A Connector
- 1.3mm DC Jack input
1. 128x32 LCD¶
An example program to print text and variables to the LCD
Import program
00001 #include "mbed.h" 00002 #include "C12832.h" 00003 00004 00005 C12832 lcd(p5, p7, p6, p8, p11); 00006 00007 int main() 00008 { 00009 int j=0; 00010 lcd.cls(); 00011 lcd.locate(0,3); 00012 lcd.printf("mbed application board!"); 00013 00014 while(true) { // this is the third thread 00015 lcd.locate(0,15); 00016 lcd.printf("Counting : %d",j); 00017 j++; 00018 wait(1.0); 00019 } 00020 }
A full featured test program :
Demo for using bitmap graphic :
2. Joystick¶
An example program for the mbed application board that uses the joystick button. LED1,2,3,4 light in sequence with up, down, left, right, and pushing the button lights them all (as a 80's computer gamer, I want to call this "fire!")
Note: that the orientation is looking at the screen in landscape, with the row of connectors at the bottom
Import program
00001 #include "mbed.h" 00002 00003 BusIn joy(p15,p12,p13,p16); 00004 DigitalIn fire(p14); 00005 00006 BusOut leds(LED1,LED2,LED3,LED4); 00007 00008 int main() 00009 { 00010 while(1) { 00011 if (fire) { 00012 leds=0xf; 00013 } else { 00014 leds=joy; 00015 } 00016 wait(0.1); 00017 } 00018 }
Import program kill_the_bit
Classic Kill the Bit game for the application board. Press joystick down to kill off the leftmost LED, but if your timing is off more LEDs turn on. LEDs flash and speaker beeps when all LEDs are off.
Last commit 26 Nov 2013 by jim hamblen
Import program appbd_edmaker
Executive decision maker for the mbed NXP1768 Application board. Ask a question, and press the center joystick button. Uses a pushbutton, PWM speaker, mbed LEDs, RGB LED, LCD, and the C rand function.
Last commit 03 Feb 2015 by jim hamblen
3. 2 x Potentiometers¶
To be completed
4. Analog Out¶
Plug in a pair of earphones.
Import program
00001 #include "mbed.h" 00002 00003 AnalogOut Aout(p18); 00004 AnalogIn pot1(p19); 00005 00006 int main() 00007 { 00008 while(1) { 00009 for(float i=0.0; i<1.0; i+=0.1) { 00010 Aout = i; 00011 wait(0.00001+(0.0001*pot1.read())); 00012 } 00013 } 00014 }
Play music from a *.wav audio file on PC speakers. See Application Board Waveplayer Demo for complete instructions.
Import program AppBoard_Waveplayer
A wave player demo setup for the mbed application board. Reads a wave file from a USB flash drive, and outputs to the onboard speaker (very low volume) and the analog audio out jack that can be connected to a set of PC speakers for more volume. A wave file for the demo is available at http://mbed.org/media/uploads/4180_1/sample.wav. Copy it to the USB drive. See http://mbed.org/users/4180_1/notebook/application-board-waveplayer-demo/ for more details and instructions.
Last commit 01 Nov 2013 by jim hamblen
5. Speaker¶
A frequency sweep. Press the fire button to to play it again!
Import program
00001 #include "mbed.h" 00002 00003 DigitalIn fire(p14); 00004 PwmOut spkr(p26); 00005 00006 int main() 00007 { 00008 while (1) { 00009 for (float i=2000.0; i<10000.0; i+=100) { 00010 spkr.period(1.0/i); 00011 spkr=0.5; 00012 wait(0.1); 00013 } 00014 spkr=0.0; 00015 while(!fire) {} 00016 } 00017 }
Play music from a *.wav audio file on the speaker. See Application Board Waveplayer Demo for complete instructions.
Import program AppBoard_Waveplayer
A wave player demo setup for the mbed application board. Reads a wave file from a USB flash drive, and outputs to the onboard speaker (very low volume) and the analog audio out jack that can be connected to a set of PC speakers for more volume. A wave file for the demo is available at http://mbed.org/media/uploads/4180_1/sample.wav. Copy it to the USB drive. See http://mbed.org/users/4180_1/notebook/application-board-waveplayer-demo/ for more details and instructions.
Last commit 01 Nov 2013 by jim hamblen
6. 3 Axis Accelerometer¶
Import program
00001 //Uses the measured z-acceleration to drive leds 2 and 3 of the mbed 00002 00003 #include "mbed.h" 00004 #include "MMA7660.h" 00005 00006 MMA7660 MMA(p28, p27); 00007 00008 DigitalOut connectionLed(LED1); 00009 PwmOut Zaxis_p(LED2); 00010 PwmOut Zaxis_n(LED3); 00011 00012 int main() { 00013 if (MMA.testConnection()) 00014 connectionLed = 1; 00015 00016 while(1) { 00017 Zaxis_p = MMA.z(); 00018 Zaxis_n = -MMA.z(); 00019 } 00020 00021 }
Import library MMA7660
Library for the MMA7660 triple axis accelerometer
Last commit 13 May 2014 by Erik -
Import program app-board-Bubble-Level
This demo uses the application board’s three axis accelerometer and the LCD display working in graphics mode to build an electronic version of a bubble level.
Last commit 22 Sep 2013 by jim hamblen
7. Analog In¶
To be completed
8. Servo Motor¶
An example program that uses the two potentiometers to set the position of the servo motors. You'll need to supply 6v into the DC socket, (1.3mm, center/tip positive)
Import program
00001 #include "mbed.h" 00002 #include "Servo.h" 00003 00004 Servo s1(p21); 00005 Servo s2(p22); 00006 00007 AnalogIn p1(p19); 00008 AnalogIn p2(p20); 00009 00010 int main() { 00011 while(1) { 00012 s1=p1; 00013 s2=p2; 00014 wait(0.1); 00015 } 00016 }
Import library Servo
A class to control a model R/C servo, using a PwmOut
Last commit 02 Sep 2010 by Simon Ford
9. RGB LED¶
An example program that cycles the on board RGB LED through various colours.
Information
The RGB LED is common anode, so that "0" is on, and "1" is off. For PWM, the closer to 0.0 the brighter, the closer to 1.0 the dimmer. use (1.0 - value) to invert.
Import program
00001 #include "mbed.h" 00002 00003 PwmOut r (p23); 00004 PwmOut g (p24); 00005 PwmOut b (p25); 00006 00007 int main() 00008 { 00009 r.period(0.001); 00010 while(1) { 00011 for(float i = 0.0; i < 1.0 ; i += 0.001) { 00012 float p = 3 * i; 00013 r = 1.0 - ((p < 1.0) ? 1.0 - p : (p > 2.0) ? p - 2.0 : 0.0); 00014 g = 1.0 - ((p < 1.0) ? p : (p > 2.0) ? 0.0 : 2.0 - p); 00015 b = 1.0 - ((p < 1.0) ? 0.0 : (p > 2.0) ? 3.0 - p : p - 1.0); ; 00016 wait (0.01); 00017 } 00018 } 00019 }
Import program app-board-RGB2
Example program to cycle the RGB LED on the mbed application board through all colours
Last commit 05 Dec 2012 by Peter Drescher
10. USB Device¶
Import program
00001 #include "mbed.h" 00002 #include "USBMouse.h" 00003 00004 USBMouse mouse; 00005 00006 int main() { 00007 int16_t x = 0; 00008 int16_t y = 0; 00009 int32_t radius = 10; 00010 int32_t angle = 0; 00011 00012 while (1) { 00013 x = cos((double)angle*3.14/180.0)*radius; 00014 y = sin((double)angle*3.14/180.0)*radius; 00015 00016 mouse.move(x, y); 00017 angle += 3; 00018 wait(0.001); 00019 } 00020 }
Import program USBKeyboard_HelloWorld
USBKeyboard Hello World
Last commit 01 Mar 2013 by Samuel Mokrani
11. LM75B Temperature sensor¶
An example program to read the current temperature from the LM75B and display it on the LCD
Import program
00001 #include "mbed.h" 00002 #include "LM75B.h" 00003 #include "C12832.h" 00004 00005 C12832 lcd(p5, p7, p6, p8, p11); 00006 00007 LM75B sensor(p28,p27); 00008 Serial pc(USBTX,USBRX); 00009 00010 int main () 00011 { 00012 00013 //Try to open the LM75B 00014 if (sensor.open()) { 00015 printf("Device detected!\n"); 00016 00017 while (1) { 00018 lcd.cls(); 00019 lcd.locate(0,3); 00020 lcd.printf("Temp = %.3f\n", (float)sensor); 00021 wait(1.0); 00022 } 00023 00024 } else { 00025 error("Device not detected!\n"); 00026 } 00027 00028 }
Import library LM75B
A simply library for the LM75B I2C temperature sensor
Last commit 26 Oct 2012 by Chris Styles
12. Xbee socket¶
Websocket over Wifly - Hello World - This example send messages to the mbed websocker server over a wifi connection using the RN-XV Wifly module.
The output can be seen at
Import program
00001 #include "mbed.h" 00002 #include "WiflyInterface.h" 00003 #include "Websocket.h" 00004 #include "LM75B.h" 00005 #include "MMA7660.h" 00006 00007 00008 /* wifly interface: 00009 * - p9 and p10 are for the serial communication 00010 * - p30 is for the reset pin 00011 * - p29 is for the connection status 00012 * - "mbed" is the ssid of the network 00013 * - "password" is the password 00014 * - WPA is the security 00015 */ 00016 00017 WiflyInterface wifly(p9, p10, p30, p29, "mbed", "password", WPA); 00018 00019 // accelerometer 00020 MMA7660 acc(p28, p27); 00021 00022 // temperature sensor 00023 LM75B tmp(p28,p27); 00024 00025 00026 int main() 00027 { 00028 char json_str[100]; 00029 00030 wifly.init(); //Use DHCP 00031 while (!wifly.connect()); 00032 printf("IP Address is %s\n\r", wifly.getIPAddress()); 00033 00034 // See the output on http://sockets.mbed.org/app-board/viewer 00035 Websocket ws("ws://sockets.mbed.org:443/ws/app-board/wo"); 00036 00037 // connect WS server 00038 while (!ws.connect()); 00039 00040 while (1) { 00041 // create json string with acc/tmp data 00042 sprintf(json_str, "{\"id\":\"app_board_wifly_EW2013\",\"ax\":%d,\"ay\":%d,\"az\":%d, \"tmp\":%d}", (int)(acc.x()*360), (int)(acc.y()*360), (int)(acc.z()*360), (int)tmp.read()); 00043 00044 // send str 00045 ws.send(json_str); 00046 00047 wait(0.1); 00048 } 00049 }
HTTP Client over Wifly - Hello World
Import program app-board-Wifly-HTTPClient
An example program using the HTTP Client over wifly, creat
Last commit 26 Oct 2012 by Chris Styles
13. Ethernet Interface¶
NTP Hello World - This example fetches the the time using NTP, and prints it over the USB Serial interface. Be sure to have been through /handbook/SerialPC to make sure you have a serial console
Import program NTPClient_HelloWorld
Simple example demonstrating how to use the NTP Client to set the time
Last commit 05 Aug 2012 by Donatien Garnier
HTTP Client Hello World
Import program HTTPClient_HelloWorld
Simple example demonstrating how to use GET & POST requests with the HTTP Client
Last commit 30 Aug 2012 by Donatien Garnier
Websocket Accelerometer-Temperature demo - This example streams acceleration and temperature data to a websocket server. Visit app-board viewer to have a real time feed.
Import program app-board-Ethernet-Websocket
Modifed version from Samuel Mokrani Changed URL to push data to sensor page Added visualisation page URL as a comment
Last commit 08 Feb 2013 by Chris Styles
WiFly-xively-jumpstart-demo - Xively Jumpstart demo with WiFly module.
Import program WiFly-xively-jumpstart-demo
Xively Jumpstart Demo with WiFly module
Last commit 28 Jan 2014 by mbed official
14. USB Host¶
Important!
When using the mbed as a USB host, 15k Ohm pull down resistors are needed on the D+ and D- signals, as per the USB specification. This can be achieved by switching both switches the DIP switch to the "USB Host" position
SW1
Flash disk Hello World This example program writes the file "test.csv" to a USB flash stick, taking 100 samples (20 per second for 5 seconds) from pot1. The resulting CSV file can easily be plotted as a graph in Excel!
Import program
00001 #include "mbed.h" 00002 #include "MSCFileSystem.h" 00003 00004 MSCFileSystem fs("fs"); 00005 DigitalOut led(LED1); 00006 AnalogIn pot1(p19); 00007 00008 int main() 00009 { 00010 FILE *fp = fopen("/fs/test.csv","w"); 00011 printf("Create filehandle for test.csv\n"); 00012 00013 printf("Writing to file\n"); 00014 for (int i=0; i<100; i++) { 00015 fprintf(fp,"%.2f\n",pot1.read()); 00016 wait(0.05); 00017 led=!led; 00018 } 00019 00020 fclose(fp); 00021 printf("Close the handle\n"); 00022 led=1; 00023 }
USB 3G Modem : NTP Client Hello World This example uses a Vodafone USB 3G Modem to connect to the internet and fetch the current time using NTP
Import program VodafoneUSBModemNTPClientTest
NTP Client Test with the Vodafone USB Modem library
Last commit 30 Oct 2012 by Donatien Garnier
USB 3G Modem : HTTP Hello World This example uses a Vodafone USB 3G Modem to connect to the internet and fetch a web page using HTTP
USB 3G Modem : SMS Hello World This example uses a Vodafone USB 3G Modem, to connect to the mobile phone network for sending and receiving text messages
Import program VodafoneUSBModemSMSTest
SMS test with the Vodafone library
Last commit 30 Oct 2012 by Donatien Garnier
USB 3G Modem : app-board Websocket demo This example uses a Vodafone USB 3G Modem, to connect to the mobile phone network for sending and receiving websocket messages containing accelerometer and temperature data.
Import program app-board-USBModem-Websocket
websocket over 3g using VodafoneUSBModem and app-board on-board sensors (acc - tmp)
Last commit 21 Jun 2013 by Samuel Mokrani
Details¶
Pot 1 (left) :p19
Pot 2 (right):p20
Analog In:p17
Analog Out:p18
PWM2:p21
p26
1.3mm
6v-9v
Centre positive