ADXL345 Evaluation

Dependencies:   mbed

Committer:
jeromecoutant
Date:
Wed Aug 17 09:58:13 2016 +0000
Revision:
2:0bc5af6c7ebf
Parent:
0:51be560629b8
Child:
3:e4783c57bcc0
Use LED1/LED2/LED3 define that can be sed for each NUCLEO

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:51be560629b8 1 #include "mbed.h"
screamer 0:51be560629b8 2
jeromecoutant 2:0bc5af6c7ebf 3 DigitalOut red(LED1);
jeromecoutant 2:0bc5af6c7ebf 4 DigitalOut blue(LED2);
jeromecoutant 2:0bc5af6c7ebf 5 DigitalOut green(LED3);
screamer 0:51be560629b8 6 int i;
screamer 0:51be560629b8 7
screamer 0:51be560629b8 8 int main() {
screamer 0:51be560629b8 9 while(1) {
screamer 0:51be560629b8 10 for (i=1; i<7; i++) {
screamer 0:51be560629b8 11 red = i & 1;
screamer 0:51be560629b8 12 blue = i & 2;
screamer 0:51be560629b8 13 green = i & 4;
screamer 0:51be560629b8 14 wait(0.2);
screamer 0:51be560629b8 15 }
screamer 0:51be560629b8 16 }
screamer 0:51be560629b8 17 }