Creating a project about PriSensor for TT_Mxx

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "PirSensor.h"
00003 
00004 
00005 
00006 
00007 
00008 
00009 #if __TT_M3HQ__
00010 #define DISPLAY_TMPM_STRING "Welcome to Thundersoft TT_M3HQ"
00011 #endif
00012 
00013 
00014 #if __TT_M4G9__
00015 #define DISPLAY_TMPM_STRING "Welcome to Thundersoft TT_M4G9"
00016 #endif
00017 
00018 DigitalOut testLed(LED1);
00019 
00020 static void pirHandle()
00021 {
00022     testLed = !testLed;
00023 }
00024 
00025 int main()
00026 {
00027     printf("%s\r\n",DISPLAY_TMPM_STRING);
00028     PirSensor pir;
00029     testLed = 1;
00030     pir.handleCallback(&pirHandle);
00031     while(1)
00032     {
00033 
00034     }  
00035 }