A comprehensive API reference for the CODAL C/C++ micro:bit v2 APIs.
This API reference is still a work in progress. You may find articles that are still stubs, or that have missing content. If you feel like contributing a piece of missing content to the API reference, please feel free to create a pull request in the documentation repository.
CODAL’s accelerometer abstraction class. Allows for reading of the micro:bit’s built in accelerometer data, as well as the configuration of the sample rate and range.
Represents a single hardware button. Allows for button press event tracking.
A compass abstraction. Reads the magnetometer to determine the orientation of the device, applying tilt compensation from data provided by the accelerometer.
Representation of a coordinate space, for easy transformations in 3D space related abstractions.
A simple key-value storage medium implemented with flash as the backing store. Utilises an in-memory scratch buffer.
A software representation of an LED matrix, also used to represent the micro:bit’s LED display.
A mutable reference counted byte buffer, for general purpose use.
A copy assignable, immutable string class implemented using basic reference counting.
A lightweight message bus implementation, with asynchronous event handling using the fiber scheduler.
Represents a multi-button group, which can then be detected as a single press event.
A generic interface to represent non volatile memory controllers.
Abstraction for a simple generic pin, with ability for handling both digital and analogue I/O.
A three dimensional vector representing sample data retrieved from a 3D abstraction.
A low level timer abstraction, adding integration with the CODAL message bus event system.
Represents a button triggered by capacitive touch. Can be hooked for press events.
Licensing and attribution information for the ‘codal-core’ documentation.
Represents the micro:bit v2 in its entirety. Allows for convenient access to device drivers to control the micro:bit’s various hardware elements.
The audio API for micro:bit v2. Allows for multi-stream audio playback with a basic mixer, in addition to synthesiser support for small sound bytes.
Bluetooth low energy stack manager for the micro:bit’s BLE. Must be enabled at compile to be included in CODAL builds.
A compass calibration class for CODAL’s compass abstraction on the micro:bit.
An abstraction layer over the micro:bit’s ‘display’ (LED matrix), allowing for string display and animated images.
I2C protocol wrapper for the micro:bit. Allows for creating I2C channels over provided NRF52 pins.
Container for representations of all the micro:bit’s pins as NRF52 pin instances.
A simple logging API for the micro:bit, which enables generated results to be viewed easily from an external PC.
Power management interface for the micro:bit. Holds information on power usage, as well as functions for working with deep sleep modes.
A radio abstraction for the micro:bit. Contains functions for sending and receiving data over a set of radio bands, with buffering support.
A pseudo-thermometer for the micro:bit v2. Infers the ambient temperature based on the surface temperature readings of various chips on the micro:bit.
An abstraction for managing the micro:bit’s USB interface and corresponding flash.
Licensing and attribution information for the ‘codal-microbit-v2’ documentation.
A DMA-enabled analogue to digital converter abstraction, supporting the use of multiplexed DMA/ADC channels.
Interface which provides functions for reading and writing arbitrary portions of attached flash memory. Also provides page and size information.
Software abstraction of a single pin available to an NRF52 processor. Supports digital and analogue read/write.
An interface for performing serial over pins on the NRF52, integrated with the CODAL event system.
A capacitive touch sensor watch class, driven by a low level NRF52 timer. Allows for touch capacitive pins being driven high when pressed.
CODAL abstraction for hardware timers available to NRF52 processors.
Licensing and attribution information for the ‘codal-nrf52’ documentation.