c - Ardu-IMU将数据发送到Arduino

标签 c binary arduino

我刚刚购买了ArduIMU,并且正在尝试将数据发送到Arduino。我自定义了首选项,就在这里。

#define BOARD_VERSION 2 // 1 For V1 and 2 for V2
#define GPS_CONNECTION 0 // 0 for GPS pins, 1 for programming pins
// GPS Type Selection - Note Ublox or MediaTek is recommended.  Support for NMEA is limited.
#define GPS_PROTOCOL 1    // 1 - NMEA,  2 - EM406,  3 - Ublox, 4 -- MediaTek  
// Enable Air Start uses Remove Before Fly flag - connection to pin 6 on ArduPilot 
#define ENABLE_AIR_START 0  //  1 if using airstart/groundstart signaling, 0 if not
#define GROUNDSTART_PIN 8    //  Pin number used for ground start signal (recommend 10 on v1 and 8 on v2 hardware)
/*Min Speed Filter for Yaw drift Correction*/
#define SPEEDFILT 2 // >1 use min speed filter for yaw drift cancellation (m/s), 0=do not use speed filter
/*For debugging propurses*/
#define PRINT_DEBUG 0   //Will print Debug messages
//OUTPUTMODE=1 will print the corrected data, 0 will print uncorrected data of the gyros (with drift), 2 will print accelerometer only data
#define OUTPUTMODE 1
#define PRINT_DCM 1     //Will print the whole direction cosine matrix
#define PRINT_ANALOGS 1 //Will print the analog raw data
#define PRINT_EULER 1   //Will print the Euler angles Roll, Pitch and Yaw
#define PRINT_GPS 0     //Will print GPS data
#define PRINT_BINARY 1  //Will print binary message and suppress ASCII messages (above)
#define PERFORMANCE_REPORTING 0  //Will include performance reports in the binary output ~ 1/2 min
#define MAGNETIC_DECLINATION 2.15    // corrects magnetic bearing to true north    


好的,我将二进制模式设置为“ 1”,而不是ASCII模式“ 0”。如何读取ArduIMU发送给Arduino的数据并对其进行解码?

解:

检查我的博客,我写了一篇关于如何在Arduino上从ArduIMU读取二进制数据的文章

How to read binary data from ArduIMU - Codesigns.it

最佳答案

关于c - Ardu-IMU将数据发送到Arduino,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4898044/

相关文章:

c - 基数排序。为什么是异或?

c - 如何调整窗口大小以加载图像?

javascript - 使用 XHR 在 WebKit/Chrome 中上传二进制字符串(相当于 Firefox 的 sendAsBinary)

c - 计算机中的整数表示 - C

c++ - 串行端口的传入值有时会损坏或丢失

Qt 没有从 arduino 接收串行数据

c - 如何一次一个字符地完整读取一个文件?

C. 函数修改动态分配的二维数组时出现段错误

javascript - Node.js 如何从 MS Sql 服务器数据类型的 varbinary 转换为图像

c++ - 指向结构变量的指针未保存到 eeprom