- Factored periodic timer funcitonality out of fiber scheduler and into a new SystemTimer module module.
- Enapsulated "ticks" variable within SystemTimer module, with accessor funciton.
- Added accessor/mutator functions to get and set the tick period.
- Added a class wrapper to permit periodic callbacks to both C and C++
functions.
- Updated all references in microbit-dal to use this refactored API.
Integrated simple 1K block buffer to host small amount of persistent
data and a 1K FLASH memory block located immediately below the FOTA/DFU
bootloader and APPDATA region that intended to hold core configuration
information, such as:
* BLE bonding information.
* Compass Calibration data.
* Thermometer Calibration data.
The block is resident at 0x0003B400 - 0x0003B800.
Integration of new radio mode that permits simple local area multicast communication
directly between micro:bits using the device's on board radio hardware.
It should be noted that this implementation build directly on the nrf51822
hardware. It is not a BLE protocol, and must (currently) be operated with BLE
disabled.
A standard on the wire configuration is defined, to promote future
interoperability between projects and languages. A lightweight
packet format is also defined and adhered to, so as to promote future
extensibility without sacrificing compatibility. The notion of groups is also
introduced, that enable multiple groups of children to work in the same area
without compromising each other's projects.
In adition to a low level packet radio driver, two higher level protocols are
defined that allow simple user datagram communication between micro:bits and
an EventBus protocol that allows the micro:bit's MessageBus to be extended to
other micro:bits.
Added a new class called MicroBitLightSensor which interleaves sensing
with the display.
This class takes advantage of the previous commits which add a dynamic
system tick, and a new display mode for the display.
A future optimisation would be for the display to handle the instantion
of a light sensor when the display mode is changed!
An e-compass solution requires knowwlede two pieces of data to provide an
accurate heading:
- Accurate calibration of the magnetometer hardware so that reliable
measurements can be taken.
- Knowledge of the pitch and roll of of device, so that the correct
components of the X/Y and Z axis sensors of the magnetomer can be used
to sense the magnetic field in a horizontal plane regardless of the tilt
of the device.
This commit represent changes to the MicroBitAccelerometer and MicroBitCompass
classes to implemen tthese goals. More specifically, this commit provides:
- The introduciton of an interactive calibration 'game', that can rapidly
gather all the data required to calibrate the compass.
- An improved calibration algorithm based on a Least Mean Squares approach of
compass samples, as documened in Freescale Application Note AN4248.
- The inclusion of a simple Matrix4 class to enable efficient Least Mean
Squares implementation.
- A change from asynchronous to synchronous calibration of the compass when
first used. This is in repsonse to a feature request for this from users
and high level languages using microbit-dal.
- Support for detemrining tilt and roll angle in MicroBitAccelerometer
- Support for multiple co-ordinate spaces in MicroBitAccelerometer and
MicroBitCompass. Data can now be read in either RAW (unaltered) data.
MICORBIT_SIMPLE_CARTESIAN (as used previously) or NORTH_EAST_DOWN
(the industry convention in mobile phones, tablets and aviation)
- Implementation of a tilt compensated algorithm, used when determining
device heading.
More specifically, the build system now uses the semantic versioning meta-data
held in module.json to define a major.minor.patch version. Additionally, is the branch
being compiled is *not* the master branch, the version is appended with <branchname><githash>.
Specific updates:
- Updates to CMake files to expose this to the micro:bit runtime code.
- Addition of uBit.systemVersion() to expose this to application code.
- Displaying of version string over serial if MICROBIT_DBG is enabled.
- Distribution of version string over BLE via the firmware revision characteristic.
First functionally complete BLE profile, matching BLE speicfication v1.6.
More specifically, the following services are now functional:
- AccelerometerService
- MeganetometerService
- EventService
- TemperatureServide
- IOPinService
- DFUService
- ButtonService
- LEDService
Also, updates to underlying device drivers to enable greater configurability:
- MicroBitCompass now supports variable sample rates and temperature sensing
- MicroBitAccelerometer now supports variable sample rates and ranges
- MicroBitThermometer introduced
- MicroBitMessageBus adapted to permit enumeration and block removal of listeners
Finally, MicroBit DFU Service has been changed to the new UUIDs specificed in v1.6 of BLE spec.
A header file containing custom configuration options for the microbit:runtime can
now be defined through a yotaa configuration option.
For example, including the following inside a top level config.json file
will load configuration options from a file called "MicroBitCustomConfig.h" that is stored
alongside an application's main.cpp. Any options defined there will override the defaults
defined in microbit-dal/inc/MicroBitConfig.h :
{
"microbit" :{
"configfile" : "source/MicroBitCustomConfig.h"
}
}