-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing public method accelerometer.whoAmI() #447
Comments
I think this is the case. In fact the whoAmI function is not implemented yet. PR #373 was to implement whatAmI. From https://lancaster-university.github.io/microbit-docs/ubit/accelerometer/ If you need to determine which accelerometer is in use now, as a temporary workaround, you could try using the isDetected functions. These functions make a call to I2C to see what hardware is present, whereas whoAmI/whatAmI would return the previously detected state. For example,
microbit-dal/inc/drivers/MMA8653.h Line 124 in 9164922
microbit-dal/inc/drivers/FXOS8700.h Line 225 in 9164922
|
Thank you Martin - I tried the work around and it works. Slight nit - on the public class names for the accelerometer - the MMA8653 and the FXOS8700 use class name's based on the device as in The LSM303 uses LSM303Accelerometer::isDetected. |
Not sure I understand, but yes, we should only need to use functions in MicroBitAccelerometer (ie. uBit.accelerometer). Accessing the device specific class is the only workaround I can see, until whoAmI gets added. |
The file microbit-dal/source/drivers/MicroBitAccelerometer.cpp appears to be missing a declaration for the public method accelerometer.whoAmI() as described in the documentation here:
https://lancaster-university.github.io/microbit-docs/ubit/accelerometer/#whoami
The text was updated successfully, but these errors were encountered: