thijse / Arduino-CmdMessenger

CmdMessenger Communication library for Arduino & .NET
Other
208 stars 87 forks source link

Wanted new example using nordic uart nrf52 sending binary data #25

Open bossesand opened 7 years ago

bossesand commented 7 years ago

I need assistance, I think the CmdMessenger is a great idea, I have used it to send data from a bno055 from a arduino over USB serial, it works great,

Now I am trying to using BLE uart using a Adafruit nrf52 feather and the Arduino IDE 1.8.1

CmdMessenger cmdMessenger = CmdMessenger(bleuart); ... // Send the result of the IMU read using quarternions //cmdMessenger.sendCmd(kQuarternionSend,q0,q1,q2,q3); cmdMessenger.sendCmdStart(kQuarternionSend); cmdMessenger.sendCmdBinArg(mySensor.quat.q0); cmdMessenger.sendCmdBinArg(mySensor.quat.q1); cmdMessenger.sendCmdBinArg(mySensor.quat.q2); cmdMessenger.sendCmdBinArg(mySensor.quat.q3); cmdMessenger.sendCmdEnd(); }

My problem is that when I use the string version cmdMessenger.sendCmdArg(mySensor.quat.q2); the terminal shows each character on a new line ! So I am thinking something is wrong on a basic level, when sending a normal bleuart.println("String to be Printed"); It comes out in one line on the receiver on arduino ble uart app.

I want to change to binary format for the quaternion data so that the message can be sent in one BLE notification / message. This should be most efficient!

Can anyone assist?

Bo-Erik