..

Dependencies:   ID12RFID TFTLCD mbed

main.cpp

Committer:
allanalpha
Date:
2013-02-01
Revision:
0:1a4b667a7f2a
Child:
2:b0edfc6c035a

File content as of revision 0:1a4b667a7f2a:

#include "mbed.h"
#include "ID12RFID.h"
#include "hx8340bs.h"

ID12RFID rfid(p10); // uart rx
HX8340S_LCD lcd( p9, p14, p13, p11 ); //Screen initialization
 // HX8340S_LCD( PinName CS, PinName RESET, PinName SCL, PinName SDI, PinName BL = NC, backlight_t blType = Constant, float defaultBackLightLevel = 1.0 );
    

int main() {
    printf("Hello World\n");
    // initialize display - place it in standard portrait mode and set background to black and
     //                      foreground to white color.
      lcd.Initialize();
      lcd.FillScreen(COLOR_CYAN);
      lcd.SetBackground(COLOR_BLUE);
      lcd.DrawRoundRect(20,20,60,60,COLOR_RED);
      // set current font to the smallest 8x12 pixels font.
      //lcd.SetFont( TerminusFont );
      // print something on the screen
      lcd.Print( "Hello, World!", CENTER, 25 ); // align text to center horizontally and use starndard colors

    while(1) {
        if(rfid.readable()) {
            printf("RFID Tag number : %d\n", rfid.read());             
        }
    }
}