8 months ago.

The accelerometer code cannot be executed on the microbit hardware version 1.5.

The accelerometer program can work normally in the microbit 1.3B version, but there is no response on the microbit V1.5. How can I solve this?

The following APIs are not working properly: uBit.accelerometer.getX(); uBit.accelerometer.getY(); uBit.messageBus.listen(MICROBIT_ID_ACCELEROMETER, MICROBIT_ACCELEROMETER_EVT_DATA_UPDATE, onAccDataUpdate); uBit.messageBus.listen(MICROBIT_ID_GESTURE, MICROBIT_ACCELEROMETER_EVT_SHAKE, onGesture);

Question relating to:

The BBC micro:bit is a pocket-sized, codable computer that allows anyone to get creative with technology. Made possible through a major partnership with 31 organisations, a micro:bit has been given ...
Comment on this question

3 Answers

4 months, 2 weeks ago.

Does the mbed OS Device Abstraction Layer (DAL) hide the differences between the v1.5 ST Micro accelerometers and the earlier NXP accelerometers (MMA8653) ? SHould newly developed code probe to see which accelerometer is installed and then provide code for both accelerometers ?

6 months, 2 weeks ago.

"The v1.5 micro:bit has a footprint for two different motion sensors: one made by ST (the LSM303AGR) and one by NXP (FXOS8700CQ). The micro:bit DAL supports both of these sensors, detecting them at runtime. To date, all v1.5 boards have been manufactured with the LSM303AGR."

Source: https://tech.microbit.org/hardware/

Try this : https://os.mbed.com/teams/ST/code/LSM303AGR/

Please see the above question regarding Device Abstraction Layer (DAL) and accelerometer versions

posted by Bob Wilmes 03 Jun 2019
1 month ago.

the issue at hand here is the library in the mbed IDE has not been updated.

https://github.com/lancaster-university/microbit-dal/blob/master/CHANGELOG

the current version is from 2016, when there has been two updates since then, one of them specific to changing the support for the new hardware (as the accelerometer has changed).


You need to log in to post a question