| Line 83... |
Line 83... |
| 83 |
accel_x = buffer[9] << 8 | buffer[8]; |
83 |
accel_x = buffer[9] << 8 | buffer[8]; |
| 84 |
accel_z = buffer[11] << 8 | buffer[10]; |
84 |
accel_z = buffer[11] << 8 | buffer[10]; |
| 85 |
|
85 |
|
| 86 |
// Print out what we have |
86 |
// Print out what we have |
| 87 |
Serial.print(gyro_x); // echo the number received to screen |
87 |
Serial.print(gyro_x); // echo the number received to screen |
| 88 |
Serial.print(","); |
88 |
Serial.print(" "); |
| 89 |
Serial.print(gyro_y); // echo the number received to screen |
89 |
Serial.print(gyro_y); // echo the number received to screen |
| 90 |
Serial.print(","); |
90 |
Serial.print(" "); |
| 91 |
Serial.print(gyro_z); // echo the number received to screen |
91 |
Serial.print(gyro_z); // echo the number received to screen |
| 92 |
Serial.print(","); |
92 |
Serial.print(" "); |
| 93 |
Serial.print(accel_x); // echo the number received to screen |
93 |
Serial.print(accel_x); // echo the number received to screen |
| 94 |
Serial.print(","); |
94 |
Serial.print(" "); |
| 95 |
Serial.print(accel_y); // echo the number received to screen |
95 |
Serial.print(accel_y); // echo the number received to screen |
| 96 |
Serial.print(","); |
96 |
Serial.print(" "); |
| 97 |
Serial.print(accel_z); // echo the number received to screen |
- |
|
| 98 |
|
- |
|
| 99 |
Serial.println(""); // prints carriage return |
97 |
Serial.println(accel_z); // prints the number and carriage return |
| 100 |
delay(400); // wait for a second |
98 |
delay(100); // some wait before new reading |
| 101 |
} |
99 |
} |