It appears that Intel is changing the CurieImu library around and incorporating alot of whats in the BMP160 library into the CurieImu library proper. Not sure if there plan is eventually delete the BMP160 library or not. They are also removing the enumerators to the register settings for whatever reason and appears to me to be complicating the issue or they are tailoring it only for what they think are specific uses.
Suggest you all have a look and make a backup copy of the old library before installing the new board when its released.
Ok been playing around with the new CurieIMU library using the accelerometer example. Here is what I found for those of use that use the library:
In some cases enumeration based on the BMI160 library will continue to work Enumeration will not work. You will have to use the associated value.
Example:
CurieIMU.setAccelerometerRate(100); //sets accelerometer rate to 100Hz, was BMI160_ACCEL_RATE_100HZ
In other cases where the enumeration contained two value definitions such as for setDetectionThreshold it now requires the user to input the two values separately, the first for a enumerator for the detection type such as for the free fall detection and the second for the threshold.
Good thing is they now list the threshold levels for you in CurieIMU.h file instead of having to go the datasheet. Not good is that it departs from the datasheet register mapping. Good thing is you only have to do one call
To access the BMI160 functions that have not been implemented such as FIFO or DLPF you can use the following format/example:
CurieIMU.BMI160::setAccelDLPFMode(BMI160_DLPF_MODE_NORM)
There are a few function name changes but you can still access them using the format in the above bullet. Here is an example with sample output:
Example:
CurieIMU.BMI160Class::setAccelRate(BMI160_ACCEL_RATE_100HZ); //example of using the enumerator
Serial.print("CurieIMU.getAccelerometerRate: ");Serial.println(CurieIMU.getAccelerometerRate());
Serial.print("CurieIMU.BMI160::getAccelRate: ");Serial.println(CurieIMU.BMI160Class::getAccelRate());
Output:
CurieIMU.getAccelerometerRate: 100.00
CurieIMU.BMI160::getAccelerometerRate: 8 //these are equivalent
There are other changes but you are going to have to go through it.
Thanks for enumerating the differences! Another difference for my code is:
ver 1.0.4: CurieImu.Initialize();
change to:
ver 1.0.5: CurieIMU.begin();
You would think that with such extensive changes (listed by Merlin513 above) that they could have documented it more than merely saying "CurieIMU API changes" in the release notes. Yes, yes, who needs documentation when you can just read sparsely commented source code? >:(
Agree, in general I haven't been impressed with the level of software support for the 101. I don't understand this practice of selling boards to the general public so early in the development process. It just causes frustration for the Arduino target user when something that's supposed to be made easy doesn't work right. Give some out to beta testers, sure, but this thing is being marketed as "The simplicity of the UNO".
From what i have looked at the Intel Curie was originally designed for the wearable market and there is definitely that flavor to the examples that are provided. I am guessing here that the developers were not really prepared for the way us makers are planning on using or were going to put the board through or what some of us are looking for. As for documentation, like Pert said they are still developing the software suite to support the board so its like the board is still in beta testing
The changes to CurieIMU library are the developers creating a wrapper to the BMI160 library - guess they think it will make the easier on the user (maybe for some it does) but the changes need to be documented and give the user the option. By the way, you can probably still use the old IMU library since the developers decided to change the class name to CurieIMU from CurieImu just put the old lib in your local arduino directory.
What is really needed is a good explanation on how they get it working on the internal SPI bus. The internals really need to be explained in these examples.