![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
cette fois faites import plutot que modifier direct bande de gredins
Dependencies: GYRO_DISCO_L476VG mbed BSP_DISCO_L476VG COMPASS_DISCO_L476VG
main.cpp@5:a50ff92004e0, 2020-06-12 (annotated)
- Committer:
- Leonnn
- Date:
- Fri Jun 12 07:43:51 2020 +0000
- Revision:
- 5:a50ff92004e0
- Parent:
- 0:5432bdf904f9
- Child:
- 6:df81f0a821d8
plot buffer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:5432bdf904f9 | 1 | #include "mbed.h" |
bcostm | 0:5432bdf904f9 | 2 | #include "GYRO_DISCO_L476VG.h" |
bcostm | 0:5432bdf904f9 | 3 | |
bcostm | 0:5432bdf904f9 | 4 | GYRO_DISCO_L476VG gyro; |
Leonnn | 5:a50ff92004e0 | 5 | Serial pc(SERIAL_TX, SERIAL_RX); |
bcostm | 0:5432bdf904f9 | 6 | |
bcostm | 0:5432bdf904f9 | 7 | int main() |
bcostm | 0:5432bdf904f9 | 8 | { |
Leonnn | 5:a50ff92004e0 | 9 | pc.baud(115200); |
bcostm | 0:5432bdf904f9 | 10 | float GyroBuffer[3]; |
bcostm | 0:5432bdf904f9 | 11 | |
bcostm | 0:5432bdf904f9 | 12 | printf("Gyroscope started\n"); |
bcostm | 0:5432bdf904f9 | 13 | |
bcostm | 0:5432bdf904f9 | 14 | while(1) { |
bcostm | 0:5432bdf904f9 | 15 | // Read Gyroscope values |
bcostm | 0:5432bdf904f9 | 16 | gyro.GetXYZ(GyroBuffer); |
bcostm | 0:5432bdf904f9 | 17 | // Display values |
Leonnn | 5:a50ff92004e0 | 18 | pc.printf("$%8.1f %8.1f %8.1f;", GyroBuffer[0], GyroBuffer[1], GyroBuffer[2]); |
Leonnn | 5:a50ff92004e0 | 19 | wait(0.5); |
bcostm | 0:5432bdf904f9 | 20 | } |
bcostm | 0:5432bdf904f9 | 21 | } |