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
- Committer:
- Arithemetica
- Date:
- 2019-12-18
- Revision:
- 19:3ee54f9a56f3
File content as of revision 19:3ee54f9a56f3:
#include "imu_driver.hpp"
SPI spi2(PB_15, PB_14, PB_13); //1Mbps default, MOSI MISO SCLK, forIMU
Serial pc(USBTX, USBRX, 115200); // print debug message
int main()
{
ImuDriver<spi2, PC_4, PB_2, PB_1> imu(ImuExtiRcvAhrsMsg | ImuExtiRcvNormalMsg); //SPI instance, reset, data ready, slave select
while(true) {
pc.printf("% .3f, % .3f, % .3f\n\r", imu.ahrsProcessedData.attitude[0], imu.ahrsProcessedData.attitude[1], imu.ahrsProcessedData.attitude[2]);
}
}