Example using sensors from the mbed apps board or shield

Dependencies:   C027 LM75B MMA7660 mbed

main.cpp

Committer:
sam_grove
Date:
2014-02-03
Revision:
0:4ea8268e9d66
Child:
1:ac55ff7b1a7d

File content as of revision 0:4ea8268e9d66:

#include "mbed.h"
#include "C027.h"
#include "C12832_lcd.h"

//#define MBED_APPS_SHIELD
#define MBED_APPS_BOARD

DigitalOut myled(LED1);
#if defined(MBED_APPS_SHIELD)
  C12832_LCD lcd(D11, D13, D12, D7, D10);
#elif defined(MBED_APPS_BOARD)
  C12832_LCD lcd(p5, p7, p6, p8, p11);
#else
#error application board not defined
#endif

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
        lcd.locate(0,0);
        lcd.printf("Hello IoT Workshop\n");
    }
}