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.
Diff: main.cpp
- Revision:
- 18:7066655957b3
- Parent:
- 16:1121b66ef27b
- Child:
- 19:76632ff3e9fc
--- a/main.cpp Sun Jan 11 06:18:13 2015 +0000
+++ b/main.cpp Sun Jan 11 16:02:18 2015 +0000
@@ -98,10 +98,12 @@
void init_itg3200() {
char data[2];
data[0] = ITG3200_REGISTER_DLPF_FS;
- data[1] = ITG3200_FULLSCALE | ITG3200_42HZ;
+ data[1] = ITG3200_FULLSCALE | ITG3200_42HZ; //bitwise or
+ pc.printf("Fullscale : %i, 42HZ : %i\n", ITG3200_FULLSCALE, ITG3200_42HZ);
+ pc.printf("Bitwise Or : %i\n", (unsigned int)data[1]);
+
i2c.write(ITG3200_ADDRESS_W, data,2);
-
i2c.read(ITG3200_ADDRESS_R, data, 1);
pc.printf("%i\n",(unsigned int)data);