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 14:93d715bd49a7, committed 2016-02-12
- Comitter:
- Jamg
- Date:
- Fri Feb 12 13:41:02 2016 +0000
- Parent:
- 13:0d56aff123d4
- Child:
- 15:29157e15b78e
- Commit message:
- Revisar
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 12 13:35:29 2016 +0000
+++ b/main.cpp Fri Feb 12 13:41:02 2016 +0000
@@ -8,47 +8,24 @@
PwmOut bled(LED_BLUE);
int16_t dato[3];
int16_t x = 0;
- int16_t y = 0;
-
+ int16_t y = 0;
int16_t z = 0;
int main() {
-
-
-
-
- while(1) {
-
-
- //temblor
+ while(1) {
+
acc.getAccAllAxis(dato);
-
x = dato[0] * 0.03;
y = dato[1] * 0.03;
z = dato[2] * 0.03;
-
- // gir.printf("%d",dato[0]);
- //gir.printf(",");
- // gir.printf("%d",dato[1]);
- // gir.printf(",");
- //gir.printf("%d,\n",dato[2]);
- // gir.printf(",");
-
- // rled = 1.0 - abs(dato[0]/16000.0);
- // gled = 1.0 - abs(dato[1]/16000.0);
- //bled = 1.0 - abs (dato[2]/16000.0);
- // wait(.3);
if(dato[0]<=-200){
rled=0;
-
wait(.2);
-
rled=1;
}else{
bled=1;
gled=0;
-
wait(.2);
gled=1;
}
@@ -82,10 +59,5 @@
wait(.2);
gled=1;
- }
-
-
-
- }
+ } }
}
-//Hola//
\ No newline at end of file
