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.
Fork of Seeed_Grove_Digital_Gyro by
main.cpp@1:6a040ee9e40b, 2010-11-27 (annotated)
- Committer:
- aberk
- Date:
- Sat Nov 27 11:44:44 2010 +0000
- Revision:
- 1:6a040ee9e40b
- Parent:
- 0:4d5987f27ca4
- Child:
- 2:e2676f02a6b1
Now uses ITG3200 library as opposed to ITG3200_lib program.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aberk | 0:4d5987f27ca4 | 1 | #include "ITG3200.h" |
aberk | 0:4d5987f27ca4 | 2 | |
aberk | 0:4d5987f27ca4 | 3 | Serial pc(USBTX, USBRX); |
aberk | 0:4d5987f27ca4 | 4 | ITG3200 gyro(p9, p10); |
aberk | 0:4d5987f27ca4 | 5 | |
aberk | 0:4d5987f27ca4 | 6 | int main() { |
aberk | 0:4d5987f27ca4 | 7 | |
aberk | 0:4d5987f27ca4 | 8 | pc.printf("Now starting ITG-3200 test...\n"); |
aberk | 0:4d5987f27ca4 | 9 | |
aberk | 0:4d5987f27ca4 | 10 | //Set highest bandwidth. |
aberk | 1:6a040ee9e40b | 11 | gyro.setLpBandwidth(LPFBW_42HZ); |
aberk | 0:4d5987f27ca4 | 12 | |
aberk | 0:4d5987f27ca4 | 13 | while (1) { |
aberk | 0:4d5987f27ca4 | 14 | |
aberk | 0:4d5987f27ca4 | 15 | //Arbitrary wait for printf clarity. |
aberk | 0:4d5987f27ca4 | 16 | wait(0.1); |
aberk | 1:6a040ee9e40b | 17 | pc.printf("%i, %i, %i\n", gyro.getGyroX(), |
aberk | 0:4d5987f27ca4 | 18 | gyro.getGyroY(), gyro.getGyroZ()); |
aberk | 0:4d5987f27ca4 | 19 | |
aberk | 0:4d5987f27ca4 | 20 | } |
aberk | 0:4d5987f27ca4 | 21 | |
aberk | 0:4d5987f27ca4 | 22 | } |