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@0:c036efff0b10, 2009-11-13 (annotated)
- Committer:
- simon
- Date:
- Fri Nov 13 11:58:12 2009 +0000
- Revision:
- 0:c036efff0b10
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| simon | 0:c036efff0b10 | 1 | // LIS302 Hello World! |
| simon | 0:c036efff0b10 | 2 | |
| simon | 0:c036efff0b10 | 3 | #include "mbed.h" |
| simon | 0:c036efff0b10 | 4 | #include "LIS302.h" |
| simon | 0:c036efff0b10 | 5 | |
| simon | 0:c036efff0b10 | 6 | LIS302 acc(p5, p6, p7, p8); // mosi, miso, sclk, ncs |
| simon | 0:c036efff0b10 | 7 | |
| simon | 0:c036efff0b10 | 8 | int main() { |
| simon | 0:c036efff0b10 | 9 | while(1) { |
| simon | 0:c036efff0b10 | 10 | printf("%.3f %.3f %.3f\n", acc.x(), acc.y(), acc.z()); |
| simon | 0:c036efff0b10 | 11 | wait(0.1); |
| simon | 0:c036efff0b10 | 12 | } |
| simon | 0:c036efff0b10 | 13 | } |