el prollecto trata del detector de las vibraciones de un motor alejandro mejia garcia jorge arturo juarez ornelas
main.cpp@15:29157e15b78e, 2016-02-12 (annotated)
- Committer:
- Jajo
- Date:
- Fri Feb 12 14:54:02 2016 +0000
- Revision:
- 15:29157e15b78e
- Parent:
- 14:93d715bd49a7
- Child:
- 16:c7dc10ccba1d
final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jajo | 15:29157e15b78e | 1 | |
Jajo | 0:f4790997ab47 | 2 | #include "mbed.h" |
Jajo | 15:29157e15b78e | 3 | PwmOut rled(LED_RED); |
Jajo | 0:f4790997ab47 | 4 | PwmOut gled(LED_GREEN); |
Jajo | 0:f4790997ab47 | 5 | PwmOut bled(LED_BLUE); |
Jajo | 0:f4790997ab47 | 6 | int16_t dato[3]; |
Jajo | 0:f4790997ab47 | 7 | int16_t x = 0; |
Jamg | 14:93d715bd49a7 | 8 | int16_t y = 0; |
Jajo | 0:f4790997ab47 | 9 | int16_t z = 0; |
Jajo | 15:29157e15b78e | 10 | #include "arturo.h" |
Jajo | 15:29157e15b78e | 11 | #include "mejia.h" |
Jajo | 15:29157e15b78e | 12 | #include "MMA8451Q.h" |
Jajo | 15:29157e15b78e | 13 | |
Jajo | 15:29157e15b78e | 14 | MMA8451Q acc(PTE25, PTE24); |
Jajo | 15:29157e15b78e | 15 | |
Jajo | 0:f4790997ab47 | 16 | |
Jajo | 0:f4790997ab47 | 17 | int main() { |
Jamg | 14:93d715bd49a7 | 18 | while(1) { |
Jamg | 14:93d715bd49a7 | 19 | |
Jajo | 0:f4790997ab47 | 20 | acc.getAccAllAxis(dato); |
Jajo | 0:f4790997ab47 | 21 | x = dato[0] * 0.03; |
Jajo | 0:f4790997ab47 | 22 | y = dato[1] * 0.03; |
Jajo | 0:f4790997ab47 | 23 | z = dato[2] * 0.03; |
Jajo | 15:29157e15b78e | 24 | arturo_mensaje(); |
Jajo | 15:29157e15b78e | 25 | mejia_mensaje(); |
Jajo | 15:29157e15b78e | 26 | |
Jajo | 0:f4790997ab47 | 27 | |
Jajo | 15:29157e15b78e | 28 | |
Jajo | 0:f4790997ab47 | 29 | } |
Jajo | 15:29157e15b78e | 30 | } |