MMA8452 3 axis accelerometer.
Dependencies: MMA8452 N5110 mbed
Revision 2:a659621a83b0, committed 2015-05-10
- Comitter:
- a1163480319
- Date:
- Sun May 10 15:41:32 2015 +0000
- Parent:
- 1:2fb6ba702a97
- Commit message:
- add led
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun May 10 11:26:37 2015 +0000 +++ b/main.cpp Sun May 10 15:41:32 2015 +0000 @@ -8,7 +8,7 @@ MMA8452 mma8452(p28,p27); // SDA, SCL Serial serial(USBTX,USBRX);//serial port InterruptIn button(p17);//button - +BusOut leds(p24);//led Ticker buzzer_timer;//buzzer timer PwmOut buzzer(p21);//buzzer @@ -195,7 +195,7 @@ } - + leds=1; ain = pot.read(); /* Read analog value (output will be any value between 0 and 1 */