Proyecto Nivel, Edgar Ochoa, Erik Garcia

Dependencies:   MMA8451Q mbed

Committer:
verden32
Date:
Mon Feb 15 03:56:54 2016 +0000
Revision:
41:20830add1e32
Parent:
39:41543351d339
-.-.-..-.}; ;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vikglz 9:4c0271cd6e49 1 #include "adcBasic.h"
verden32 27:85d44b207258 2
verden32 27:85d44b207258 3 int16_t data[3];
verden32 0:cf09f0ecb330 4 PwmOut r(LED_RED);
verden32 0:cf09f0ecb330 5 PwmOut g(LED_GREEN);
verden32 0:cf09f0ecb330 6 PwmOut b(LED_BLUE);
vikglz 9:4c0271cd6e49 7 Serial pc(USBTX,USBRX);
through 22:de1ab79df237 8 float x,y,z;
verden32 27:85d44b207258 9 #include "Ochoa.h"
verden32 27:85d44b207258 10 #include "versionerik.h"
verden32 27:85d44b207258 11 #include "mbed.h"
verden32 27:85d44b207258 12 #include "MMA8451Q.h"
verden32 27:85d44b207258 13 MMA8451Q acc(PTE25, PTE24);
verden32 0:cf09f0ecb330 14
vikglz 9:4c0271cd6e49 15
vikglz 9:4c0271cd6e49 16
verden32 27:85d44b207258 17
verden32 0:cf09f0ecb330 18 int main() {
verden32 0:cf09f0ecb330 19
verden32 0:cf09f0ecb330 20 pc.baud(9600); //velocidad serial//
verden32 0:cf09f0ecb330 21 pc.format(8,SerialBase::None ,1) ;
verden32 0:cf09f0ecb330 22 pc.putc(65);
verden32 26:e10b8fb4e2ae 23
verden32 0:cf09f0ecb330 24 while(1) {
verden32 0:cf09f0ecb330 25
verden32 0:cf09f0ecb330 26 acc.getAccAllAxis(data);
through 10:76ab6531ba6f 27
through 22:de1ab79df237 28 z = 1.0 - abs(data[0]/16500.0);
through 22:de1ab79df237 29 y = 1.0 - abs(data[1]/16500.0);
through 22:de1ab79df237 30 x = 1.0 - abs(data[2]/16500.0);
verden32 39:41543351d339 31
through 36:2bc74f4ce17b 32 erik_nivel();
verden32 26:e10b8fb4e2ae 33 Mensajes();
through 36:2bc74f4ce17b 34
verden32 0:cf09f0ecb330 35
verden32 26:e10b8fb4e2ae 36
verden32 0:cf09f0ecb330 37
through 36:2bc74f4ce17b 38 wait(0.1);
verden32 0:cf09f0ecb330 39
verden32 0:cf09f0ecb330 40 }
verden32 0:cf09f0ecb330 41
verden32 0:cf09f0ecb330 42 }
verden32 0:cf09f0ecb330 43
vikglz 1:f15981c66b73 44
vikglz 2:435a2b33e092 45 //Hola Mundo!!! jajajaja
vikglz 9:4c0271cd6e49 46 //otro cambio