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@19:3ee54f9a56f3, 2019-12-18 (annotated)
- Committer:
- Arithemetica
- Date:
- Wed Dec 18 06:53:12 2019 +0000
- Revision:
- 19:3ee54f9a56f3
add operator for ImuExtiConfig enum
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Arithemetica | 19:3ee54f9a56f3 | 1 | #include "imu_driver.hpp" |
| Arithemetica | 19:3ee54f9a56f3 | 2 | |
| Arithemetica | 19:3ee54f9a56f3 | 3 | SPI spi2(PB_15, PB_14, PB_13); //1Mbps default, MOSI MISO SCLK, forIMU |
| Arithemetica | 19:3ee54f9a56f3 | 4 | Serial pc(USBTX, USBRX, 115200); // print debug message |
| Arithemetica | 19:3ee54f9a56f3 | 5 | |
| Arithemetica | 19:3ee54f9a56f3 | 6 | int main() |
| Arithemetica | 19:3ee54f9a56f3 | 7 | { |
| Arithemetica | 19:3ee54f9a56f3 | 8 | ImuDriver<spi2, PC_4, PB_2, PB_1> imu(ImuExtiRcvAhrsMsg | ImuExtiRcvNormalMsg); //SPI instance, reset, data ready, slave select |
| Arithemetica | 19:3ee54f9a56f3 | 9 | |
| Arithemetica | 19:3ee54f9a56f3 | 10 | while(true) { |
| Arithemetica | 19:3ee54f9a56f3 | 11 | pc.printf("% .3f, % .3f, % .3f\n\r", imu.ahrsProcessedData.attitude[0], imu.ahrsProcessedData.attitude[1], imu.ahrsProcessedData.attitude[2]); |
| Arithemetica | 19:3ee54f9a56f3 | 12 | } |
| Arithemetica | 19:3ee54f9a56f3 | 13 | } |