True leaf photo frame,gesture sensing APDS9960,motor fan,color LED

Dependencies:   SFE_APDS9960 mbed

main.cpp

Committer:
yzh344612058
Date:
2016-04-19
Revision:
0:9b48e23879b3
Child:
1:d16891627cd3

File content as of revision 0:9b48e23879b3:

#include <mbed.h>
#include "SparkFun_APDS9960.h"
#include "led.h"

Serial pc(P0_23,P0_25);   // TX Pin, RX Pin
I2C i2c(P0_8, P0_9); 
SparkFun_APDS9960 apds(&i2c);

 int main()
 {
     pc.printf("Hello world!\n"); 
     
     if(apds.init(10000))
        pc.printf("APDS-9960 initialization complete\n");
     else
        pc.printf("Something went wrong during APDS-9960 init!");
        
     if (apds.enableGestureSensor(true) ) 
        printf("Gesture sensor is now running\n");
     else 
        printf("Something went wrong during gesture sensor init!\n");
        
        
     while(1)
     {
         Led_Blink();     
    }
 }