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.
Dependencies: microbit microbitmpr121
main.cpp@5:fc4f3c9cb438, 2017-01-16 (annotated)
- Committer:
- owenbrotherwood
- Date:
- Mon Jan 16 21:58:36 2017 +0000
- Revision:
- 5:fc4f3c9cb438
- Parent:
- 4:52b5898cc757
- Child:
- 6:140aaeee9a5d
where when why
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| owenbrotherwood | 0:026bd8011ba6 | 1 | #include "MicroBit.h" |
| owenbrotherwood | 0:026bd8011ba6 | 2 | #include "MicroBitMpr121.h" |
| owenbrotherwood | 0:026bd8011ba6 | 3 | |
| owenbrotherwood | 5:fc4f3c9cb438 | 4 | // https://lancaster-university.github.io/microbit-docs/advanced/#using-components-directly |
| owenbrotherwood | 5:fc4f3c9cb438 | 5 | |
| owenbrotherwood | 4:52b5898cc757 | 6 | MicroBitI2C i2c = MicroBitI2C(I2C_SDA0, I2C_SCL0); |
| owenbrotherwood | 4:52b5898cc757 | 7 | MicroBitMpr121 mpr121 = MicroBitMpr121(i2c); |
| owenbrotherwood | 0:026bd8011ba6 | 8 | |
| owenbrotherwood | 0:026bd8011ba6 | 9 | int main() |
| owenbrotherwood | 5:fc4f3c9cb438 | 10 | { |
| owenbrotherwood | 5:fc4f3c9cb438 | 11 | mpr121.enable(); |
| owenbrotherwood | 5:fc4f3c9cb438 | 12 | //mpr121.registerDump(pc); |
| owenbrotherwood | 0:026bd8011ba6 | 13 | |
| owenbrotherwood | 5:fc4f3c9cb438 | 14 | while(1) { |
| owenbrotherwood | 5:fc4f3c9cb438 | 15 | |
| owenbrotherwood | 5:fc4f3c9cb438 | 16 | } |
| owenbrotherwood | 5:fc4f3c9cb438 | 17 | } |