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.
main.cpp@7:4377556c2d5b, 2015-01-10 (annotated)
- Committer:
- mlimbird
- Date:
- Sat Jan 10 02:26:04 2015 +0000
- Revision:
- 7:4377556c2d5b
- Parent:
- 6:42acd9884ffc
- Child:
- 8:c64f76d4deff
added i2c stuff
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mlimbird | 0:80725699690f | 1 | #include "mbed.h" |
| mlimbird | 0:80725699690f | 2 | |
| mlimbird | 7:4377556c2d5b | 3 | I2C i2c( p9, p10 ); // sda, scl |
| mlimbird | 0:80725699690f | 4 | DigitalOut myled(LED1); |
| mlimbird | 0:80725699690f | 5 | |
| mlimbird | 0:80725699690f | 6 | int main() { |
| mlimbird | 7:4377556c2d5b | 7 | int adxlData[3]; |
| mlimbird | 7:4377556c2d5b | 8 | int itgData[3]; |
| mlimbird | 7:4377556c2d5b | 9 | int hmcData[3]; |
| mlimbird | 7:4377556c2d5b | 10 | |
| mlimbird | 0:80725699690f | 11 | while(1) { |
| mlimbird | 7:4377556c2d5b | 12 | |
| mlimbird | 0:80725699690f | 13 | myled = 1; |
| m-limbird | 5:42066232dc6f | 14 | wait(0.1333); |
| mlimbird | 0:80725699690f | 15 | myled = 0; |
| m-limbird | 4:e51fc19119ba | 16 | wait(1.9); |
| m-limbird | 6:42acd9884ffc | 17 | //this is an awesome program. |
| mlimbird | 0:80725699690f | 18 | } |
| mlimbird | 0:80725699690f | 19 | } |