Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 27:85d44b207258, committed 2016-02-12
- Comitter:
- verden32
- Date:
- Fri Feb 12 14:46:54 2016 +0000
- Parent:
- 26:e10b8fb4e2ae
- Child:
- 28:a34c81f0b387
- Commit message:
- final parte 2
Changed in this revision
| Ochoa.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Ochoa.h Fri Feb 12 14:43:46 2016 +0000
+++ b/Ochoa.h Fri Feb 12 14:46:54 2016 +0000
@@ -4,15 +4,18 @@
void Mensajes(){
if(150<data[1] && data[1]440>){
pc.printf("Nivel estable");}
+ wait(.4);
if(0=<data[1] && data[1]>=-16000){
pc.prinft("Nivel a la derecha");}
+ wait(.4);
if(0=<data[1] && data[1]>=16000){
pc.prinft("Nivel a la izquierda");}
if(-36=<data[0] && data[0]>=16000){
pc.prinft("Nivel hacia adelante");}
+ wait(.4);
if(0=<data[0] && data[0]>=-16000){
pc.prinft("Nivel hacia atras");}
-
+ wait(.4);
//150-432
}
#endif
\ No newline at end of file
--- a/main.cpp Fri Feb 12 14:43:46 2016 +0000
+++ b/main.cpp Fri Feb 12 14:46:54 2016 +0000
@@ -1,16 +1,20 @@
#include "adcBasic.h"
-#include "mbed.h"
-#include "MMA8451Q.h"
-MMA8451Q acc(PTE25, PTE24);
+
+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);
-int16_t data[3];
+
int main() {
pc.baud(9600); //velocidad serial//
