You are viewing an older revision! See the latest version
mbed application board
The new lab board has been designed to enable the maximum number of potential experiments and projects, with the minimum footprint.
![]() | ![]() |
Apart from the fact that there are 2x20 way headers for the mbed, so it is possible break pins off-board the idea is that it is a fairly well encapsulated platform.
Schematics¶
Feature list¶
- 128x32 Grpahics LCD
- 5 way joystick
- 2 x Potentiometers
- 3.5mm Audio jack (Analog Out)
- Speaker, PWM Conencted
- 3 Axis +/1 1.5g Accelerometer
- 3.5mm Audio jack (Analog In)
- 2 x Servo motor headers
- RGB LED, PWM connected
- USB-B Connector
- Temperature sensor
- Socket for for Xbee (Zigbee) or RN-XV (Wifi)
- RJ45 Ethernet conenctor
- USB-A Connector
- 1.3mm DC Jack input
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
4. Analog Out¶
Plug in a pair of earphones.
5. Speaker¶
A frequency sweep. Press the fire button to to play it again!
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 }
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)
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 }
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 programUSBKeyboard_HelloWorld
USBKeyboard Hello World
Import programUSBSerial_HelloWorld
USBSerial Hello World
Import programUSBHID_HelloWorld
USBHID Hello World
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 programNTPClient_HelloWorld
Simple example demonstrating how to use the NTP Client to set the time
HTTP Client Hello World - This example fetches a web using
Import programHTTPClient_HelloWorld
Simple example demonstrating how to use GET & POST requests with the HTTP Client
14. USB Host¶
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 programVodafoneUSBModemNTPClientTest
NTP Client Test with the Vodafone USB Modem library
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 programVodafoneUSBModemSMSTest
SMS test with the Vodafone library
Details¶
Form factor | 55mm x 86mm x 19mm (with mbed) |
128x32 Graphics LCD, SPI Interface | Newhaven C12332A1Z MOSI:p5 nRESET:p6 SCK:p7 A0:p8 |
3 Axis +/1 1.5g Accelerometer,I2C Interface | Freescale MMA7660 SCL:p27 SDA:p28 Address:0x98 |
Temperature sensor | LM75B SCL:p27 SDA:p28 Address:0x90 |
5 way Joystick | ALPS SKRHADE010 Down:p12 Left:p13 Centre:p14 Up:p15 Right:p16 |
2 x Potentiometers | Iskra PNZ10ZA, 10k Pot 1 (left) :p19 Pot 2 (right):p20 |
2 x 3.5mm Audio jack (Analog In/Out) | CUI Inc SJ-3523-SMT Analog In:p17 Analog Out:p18 |
2 x Servo motor headers | PWM1:p22 PWM2:p21 |
RGB LED, PWM connected | Cree Inc CLV1A-FKB Red:p23 Green:p24 Blue:p25 |
Speaker, PWM Connected | MULTICOMP MCSMT-8030B-3717 p26 |
USB-B Connector | Neltron, 5075ABMR-05-SM1 |
USB-A Connector | MULTICOMP,USB-A-V |
RJ45 Ethernet conenctor | Pulse Jack, J00-0045NL |
1.3mm DC Jack input | CLIFF, FC68145S 1.3mm 6v-9v Centre positive |