-
-
Notifications
You must be signed in to change notification settings - Fork 284
Update BLE examples #375
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update BLE examples #375
Conversation
This PR is under internal testing and review. Will merge to master upon completion. |
Testing results for BLE. I only tested BatteryMonitor_Central.ino from the test directory. I tried to exercise everything from Sandeep's notes. I had to make a change to BatteryMonitor_Central.ino - it is in the test directory. The other suggestion is to change the IMU notification example to use useful data by using the readMotionSensorScaled() function instead of the readMotionSensor() function. void readMotionSensor(int& ax, int& ay, int& az, int& gx, int& gy, int& gz); Here are the results of the sketches tested. |
Here is an updated copy of the Ble IMU central and notification sketches that make use of CurieIMU.readMotionSensorScaled(imuAccel.ax, imuAccel.ay, imuAccel.az, imuGyro.gx, imuGyro.gy, imuGyro.gz); It looks like these examples are still in the test directory because they are not in Arduino format and are using pointers so the notification program I updated still uses pointers. I had to send the IMU data in two chunks since Ble is only taking 20 bytes and the 6 floating point values from the scaled function are more than 20 bytes. I have attached the sketches. |
This is ok with me, in general the items in the test folder still need to be for "Arduino style". |
Are we done with the changes and suggestions? |
I don't have any more changes for now. |
34da08f
to
a20e2e3
Compare
@SidLeung I've re-based this. |
This PR will be merge to main trunk for the upcoming release (Deneb). |
@sandeepmistry I was going to make the change to use scaling. Are we ok with using pointers like this for Arduino style? I don't see another way around it since value() is returning an address. typedef struct { // Buffers to hold IMU data |
Not really, let's stick to moving the example to the test folder for now. We can continue the discussion later. While it's in the test folder, it's excluded from the release so non-Arduino style is ok. For future reference here's an API Reference @tigoe has linked to earlier: https://www.arduino.cc/en/Reference/APIStyleGuide |
@russmcinnis , let's keep your changes in the test directory for Deneb.RC2 release. @noelpaz @russmcinnis , please do a check on this PR prior to merging. |
@bigdinotech , please review the code changes. |
Jira 872 and #482 addressed this request. |
Closing this, as the changes have been replicated by PR #482 which has been merged. |
keywords.txt
BLE.scanForUuid(...)