No tags
|
0 replies
The baseboard from Embedded Artists contains a good deal of interesting peripherals, and this page sets out to show some examples of how to go about using them.

I have added this program for convenience, it is taken directly from Rolfs cookbook pages.
http://mbed.org/users/chris/programs/EA_Twitter/5zwuo/
Add in your twitter user name and password and a message, hook up Ethernet and post a message to twitter.
An exercise for the reader would be to make the application open twitter.txt on the LocalFileSystem and parse it for the user name, password and message. This would make the binary generic, and it wouldnt have to be recompiled to change the user account details or message!
A simple program that executes a PHP that simply returns the current time of ther server as a string.
http://mbed.org/users/chris/programs/EA_HTTP/5yn3t/
The next step might be to make a new script timestamp.php which returns the UNIX timestamp of the server. This timestamp could then be used to initialise the onboard RTC.
This example program reads the onboard potentiometer, and displays the voltage on the mbed USB serial port.
The potentiometer connects to mbed p15, and you should ensure that J27 is fitted on the baseboard
Example program : http://mbed.org/users/chris/programs/EA_potentiometer/5z66h/
This example prints text and plots pixels on the OLED screen. It also uses the joystick to draw on the screen "Etch-a-Sketch" style.
Note in the example code the explanation of the wire link that must be fitted to make this example work.
Example program : http://mbed.org/users/chris/programs/EA_OLED_Joystick/5yr83/
This example exposes an API for the I2C LED driver on the baseboard. The API methods are:
void set (int led_mask); // switch LEDs in mask ON void clear (int led_mask); // Switch LEDS in mask OFF void pwm0 (int led_mask); // Set LEDS in mask to PWM0 void pwm1 (int led_mask); // Set LEDS in mask to PWM1 void period0 (float t) // Set PWM0 period void duty0 (float d); // set PWM0 duty cycle void period1 (float t) // Set PWM1 period void duty1 (float d); // set PWM1 duty cycle
Example program : http://mbed.org/users/chris/programs/EA_LEDS/60b3i/
This example program uses the rotary encoder to position a lit LED in the 16 LED array driven by the I2C driver.
Example program : http://mbed.org/users/chris/programs/EA_RotaryEncoder/60195/
Please log in to post a comment.