You are viewing an older revision! See the latest version
mbed Demo Display
This page is dedicated to the mbed Demo Display, which aims to show off a good range of the capabilities of the mbed Microcontroller
the headline features of this demo display are :
- Powered USB Host socket
- Ethernet
- Ultrasonic range finder, on I2C
- Analog panel meter, driven by PwmOut
- Servo motor, position controlled by PwmOut
- Three potentiometers on AnalogIn
- QVGA LCD Display, controlled by SPI
- RFID tag reader, connected to a Serial port
- 24-bit Audio DAC driven by I2S, controlled by I2C
USB Host¶
One of the most useful application of the USB host socket is the ability to mount a USB Mass Storage Class device, such as a USB Flash stick or an external Hard Disk.
Ethernet¶
The mbed microcontroller contains all the passive circuits, all you need is an RJ45 socket to get onto the internet, and of course some software.
The first place to visit is the Ethernet homepage, which covers the EthernetNetIf that underpins and useful ethernet features that are built upon it.
Once you are familiar with the EthernetNetIf, start building some useful apps on top:
- HTTP Client - Call URLS or run scripts
- HTTP Server - A simple webserver
- NTP Client - Set the RTC from an internet time server
- Twitter - Use twitter for automated notificatios
- Pachube - Upload data to this online service to be visualised however you choose
- MySQL - A simple client that allows you to query MySQL databases directly
Ultrasonic Ranger - SRF08¶
This I2C sensor uses ultrasonic echos to measure distance. The library module for the SRF08 has a single method that returns a floating point number representing the distance in centimetres to the reflective object.
- SRF08 Ultrasonic Ranger - Cookbok page
Moving coil panel meter¶
This is a standard panel meter with a 50uA full scale deflection current. The average current can be controlled using PwmOut. The PWM signal will scale the average voltage between 0v and 3.3v. At 3.3v the full scale current of 50uA should be flowing, so we should use a series resistor of 3.3 / 0.00005 i.e. 66k Ohms.
With this resistor in place, the PwmOut channel for the coil canbe assigned directly from the AnalogIn.
#include "mbed.h" PwmOut coil(p22); AnalogIn pot (p20); int main() { while (1) { coil = pot.read(); } }