動作環境
Arduino IDE 1.6.6
ESP8266実装機版 (ユニバーサル基板)
MPU-9250からQuaternionの値を取得しようとしている。
取得済のデータ(double)からUDP通信用にchar型に変換が必要だった。
https://stackoverflow.com/questions/19867227/convert-double-type-into-string-type-in-arduino-sketch
に記載のdtostrf()を使ったところ、char型に変換できた。
Quaternionのx成分だけの通信。
<PyQt5.QtNetwork.QHostAddress object at 0x7f295f16c828>
qtn,0.51,,
<PyQt5.QtNetwork.QHostAddress object at 0x7f295f16c898>
qtn,0.53,,
<PyQt5.QtNetwork.QHostAddress object at 0x7f295f16c828>
qtn,0.43,,
<PyQt5.QtNetwork.QHostAddress object at 0x7f295f16c898>
qtn,0.23,,