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 0:51f447235716, committed 2019-10-07
- Comitter:
- sergio_restrepo
- Date:
- Mon Oct 07 23:29:19 2019 +0000
- Commit message:
- acelerometro
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MMA8451Q.lib Mon Oct 07 23:29:19 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/emilmont/code/MMA8451Q/#c4d879a39775
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 07 23:29:19 2019 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "MMA8451Q.h" + +#define MMA8451_I2C_ADDRESS (0x1d<<1) + +int main() { + MMA8451Q acc(PTE25,PTE24,MMA8451_I2C_ADDRESS); + PwmOut rled(LED_RED); + PwmOut gled(LED_GREEN); + PwmOut bled(LED_BLUE); + + while(true) { + rled = 1.0 - abs(acc.getAccX()); + gled = 1.0 - abs(acc.getAccY()); + bled = 1.0 - abs(acc.getAccZ()); + wait(0.1); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Oct 07 23:29:19 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file