Edgar Ochoa
/
ProyectoNivel
Proyecto Nivel, Edgar Ochoa, Erik Garcia
main.cpp
- Committer:
- verden32
- Date:
- 2016-02-15
- Revision:
- 37:7bc8819f91f4
- Parent:
- 33:387a18af3fb4
File content as of revision 37:7bc8819f91f4:
#include "adcBasic.h" int16_t data[3]; PwmOut r(LED_RED); PwmOut g(LED_GREEN); PwmOut b(LED_BLUE); Serial pc(USBTX,USBRX); float x,y,z; #include "Ochoa.h" #include "versionerik.h" #include "mbed.h" #include "MMA8451Q.h" MMA8451Q acc(PTE25, PTE24); int main() { pc.baud(9600); //velocidad serial// pc.format(8,SerialBase::None ,1) ; pc.putc(65); while(1) { acc.getAccAllAxis(data); z = 1.0 - abs(data[0]/16500.0); y = 1.0 - abs(data[1]/16500.0); x = 1.0 - abs(data[2]/16500.0); erik_nivel(); Mensajes(); wait(0.2); } } //Hola Mundo!!! jajajaja //otro cambio