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:7facd99616dc, committed 2020-05-02
- Comitter:
- haraldblab
- Date:
- Sat May 02 11:41:05 2020 +0000
- Commit message:
- microbit accelerometer example from Lancaster University documentation.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
microbit.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 7facd99616dc main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat May 02 11:41:05 2020 +0000 @@ -0,0 +1,15 @@ +/* See + * http://lancaster-university.github.io/microbit-docs/advanced/ + * for docs about using the micro:bit library +*/ +#include "MicroBit.h" + +MicroBitI2C i2c = MicroBitI2C(I2C_SDA0, I2C_SCL0); +MicroBitAccelerometer accelerometer = MicroBitAccelerometer(i2c); +MicroBitDisplay display; + +int main() +{ + while(1) + display.scroll(accelerometer.getX()); +}
diff -r 000000000000 -r 7facd99616dc microbit.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/microbit.lib Sat May 02 11:41:05 2020 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/teams/Lancaster-University/code/microbit/#4b89e7e3494f