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

Dependencies:   SFE_APDS9960 mbed

Committer:
yzh344612058
Date:
Tue Apr 19 08:04:51 2016 +0000
Revision:
0:9b48e23879b3
Child:
1:d16891627cd3
?????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yzh344612058 0:9b48e23879b3 1 #include <mbed.h>
yzh344612058 0:9b48e23879b3 2 #include "SparkFun_APDS9960.h"
yzh344612058 0:9b48e23879b3 3 #include "led.h"
yzh344612058 0:9b48e23879b3 4
yzh344612058 0:9b48e23879b3 5 Serial pc(P0_23,P0_25); // TX Pin, RX Pin
yzh344612058 0:9b48e23879b3 6 I2C i2c(P0_8, P0_9);
yzh344612058 0:9b48e23879b3 7 SparkFun_APDS9960 apds(&i2c);
yzh344612058 0:9b48e23879b3 8
yzh344612058 0:9b48e23879b3 9 int main()
yzh344612058 0:9b48e23879b3 10 {
yzh344612058 0:9b48e23879b3 11 pc.printf("Hello world!\n");
yzh344612058 0:9b48e23879b3 12
yzh344612058 0:9b48e23879b3 13 if(apds.init(10000))
yzh344612058 0:9b48e23879b3 14 pc.printf("APDS-9960 initialization complete\n");
yzh344612058 0:9b48e23879b3 15 else
yzh344612058 0:9b48e23879b3 16 pc.printf("Something went wrong during APDS-9960 init!");
yzh344612058 0:9b48e23879b3 17
yzh344612058 0:9b48e23879b3 18 if (apds.enableGestureSensor(true) )
yzh344612058 0:9b48e23879b3 19 printf("Gesture sensor is now running\n");
yzh344612058 0:9b48e23879b3 20 else
yzh344612058 0:9b48e23879b3 21 printf("Something went wrong during gesture sensor init!\n");
yzh344612058 0:9b48e23879b3 22
yzh344612058 0:9b48e23879b3 23
yzh344612058 0:9b48e23879b3 24 while(1)
yzh344612058 0:9b48e23879b3 25 {
yzh344612058 0:9b48e23879b3 26 Led_Blink();
yzh344612058 0:9b48e23879b3 27 }
yzh344612058 0:9b48e23879b3 28 }