Demo Board

The demo board is simply three solderless breadboards stuck together, with a few interesting peripherals attached. It doesnt do anything particularly exciting, but you can make some fun little demos.

The Hardware

source:/DemoBoard/doc/DemoBoard.jpg

Connectivity

Peripheral Object Name Features Pins
Button RedButton This is set up as an InterruptIn p30
Button GreenButton This is set up as an DigitalIn p29
Button BlueButton This is set up as an DigitalIn p28
LED led1 Set up on a digital out LED1
LED led2 Set up on a digital out LED2
LED led3 Set up on a digital out LED3
LED led4 Set up on a digital out LED4
LocalFileSystem local Used to access the Flash drive n/a
Serial pc Used to printf, putc and get to/from the host PC USBTX,USBRX
AnalogIn light Light level sensor p16
AnalogIn potx Potentiometer for various control projects p19
AnalogIn poty Used for various control projects p20
RFID rfid Uses a serial port to read RFID tags p27
SRF05 srf Ultrasonic range finder for measuring p9, p10
MobileLCD lcd 130x130 Colour LCD p11,p12,p13,p14,p15
LIS302 acc Triple axis SPI accelerometer p5,p6,p7,p8
RGBLED rgb RGBLED connected on PwmOut for full colour p22,p23,p24
Servo servo Servo motor connected to PwmOut for mechanical positioning p21
usbhid hid USB HID interface providing mouse and keyboard interface n/a

Library

The DemoBoard code has been split into three files, a .cpp and .h file to declare and define all the peripherals, and a nice clean main.cpp.

To create a project for the DemoBoard, you can import an empty project from this link :

Projects

Range Indicator

This project uses the SRF05 ultrasonic range finder and an RGB LED to give a green-yellow-red warning of range.

RFID HID Device

This project uses the RFID tag reader and the USB intreface configured as a HID device. When a tag is presented to the RFID reader, it is scanned, and the ID number is "typed" to the host as if it were coming from a keyboard

RPC over HTTP

This project uses the ethernet connection, LCD screen, LEDs and the pot. An IP address is fetched using DHCP, and displayed on the LCD. Simply point a browser (on the same network) to http://<ipaddress>/rpc. You will see the RPC-able objects

http://<ipaddress>/rpc               // returns a list of RPCable objects
   led1 led2 led3 led4 pot

http://<ipaddress>/rpc/led1          // returns the methods for the specified object
   read write

http://<ipaddress>/rpc/led1/write,1  // call the write method on 'led1' with the argument '1' - turns on the LED

http://<ipaddress>/rpc/pot/read      // call the read method of the pot - returns a float 0.0-1.0

Accelerometer RGB

This project uses the triple axis accelerometer and an RGB LED. The x,y,z axis are assigned to the r,g,b, components, such that g measured in an axis set the intensity of it's associated colour. Move the DemoBoards orientation to mix a new colour.

Etch-a-Sketch

This project uses two pots to determine and X-Y position on the LCD screen to draw pixels. The red, green and blue buttons are used as interrupts; when they are pushed they update the draw colour. Finally, the accelerometer is used to detect a shake, and if it finds one it clears the screen!

USB Mouse

This project uses the USB interface configured as a HID mouse, two pots to provide X,Y control and a button for the mouse button.

Servo Motor Control

This project uses the Servo class and an analog in. The analog in provides and normalised float, which directly sets the normalised position of the servo.