True leaf photo frame,gesture sensing APDS9960,motor fan,color LED
Dependencies: SFE_APDS9960 mbed
Diff: main.cpp
- Revision:
- 0:9b48e23879b3
- Child:
- 1:d16891627cd3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 19 08:04:51 2016 +0000 @@ -0,0 +1,28 @@ +#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(); + } + } \ No newline at end of file