- Bluetooth connection with the free MicroLink app
- Read joystick, slider, and button inputs
- Send battery level, proximity, and heading values to your phone
- Print custom strings or metrics for debugging or user display
Initializes BLE services and characteristics:
- Setup the 4 Buttons, 3 sliders and the joystick
- Setup up the Battery, proximity, heading, Metrics, messages, and device settings, which are notified from device
Also starts advertising your CodeCell for connection.
Sends metrics packet to the app:
battery
: battery percentage (0–100)proximity
: proximity sensor valueheading
: heading in degrees (adjusted to 0–360° scale)
Only sends if values have changed since the last update to reduce BLE traffic.
Sends a string message (such as debug output) to be displayed in the app.
Each of these functions returns a value based on the activity in the app. The buttons, sliders, and joystick are automatically enabled in the app based on which functions are used in the CodeCell project.
uint8_t ReadJoystickX()
uint8_t ReadJoystickY()
uint8_t ReadSlider1()
uint8_t ReadSlider2()
uint8_t ReadSlider3()
bool ReadButtonA()
bool ReadButtonB()
bool ReadButtonC()
bool ReadButtonD()
bool ReadButtonJoystick()
if (micro.ReadButtonA()) {
Serial.println("Button A pressed!");
}
The MicroLink app connects to CodeCell over Bluetooth, allowing you to view live data and link controls to actions through this library.
The MicroLink app is currently available as a beta release on the Google Play Store and will launch on iOS on May 31st. It's completely free to use and features a clean, ad-free interface.
This library is released under the Apache License 2.0 License and is free to use in personal projects. It uses the BLEDevice.h
and BLE2902.h
, licensed under the Apache 2.0 License.