Getting Started program for the mbed carrier module (EDP-CM-mbed) on the RS EDP (Embedded Development Platform). Read the 'Getting Started Guide for the ARM mbed Carrier Module' downloadable from the EDP Design Centre pages of the RS DesignSpark web site.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // EDP & mbed Hello World Program  WGM 2010
00002 // Requires EDP-AM-CO1 communications module with PC COM port connection
00003 
00004 #include "mbed.h"
00005 
00006 Serial ASC0(p28, p27);              // Set up EDP ASC0 (default: 9600,8,N,1)
00007 DigitalOut L1(LED1);
00008 
00009 int main() {
00010     ASC0.printf("\nHello World\n"); // Print on EDP ASC0 terminal
00011 
00012     while(1) {                      // Flash User LED 1
00013         L1 = 1;
00014         wait(0.5);
00015         L1 = 0;
00016         wait(0.5);
00017     }
00018 }