Text
oled_print(text), oled_println(text), oled_set_cursor(x, y), oled_set_text_size(size)
// MICROPYTHON CALLS
Function groups and constants from the linked Jumperless Temporal
Badge API Reference. The exhaustive reference is also available
on-device as /API_REFERENCE.md.
// INIT
init() initializes the badge runtime bindings.
// DISPLAY
oled_print(text), oled_println(text), oled_set_cursor(x, y), oled_set_text_size(size)
oled_clear([show]), oled_show(), oled_invert(enable)
oled_set_font(name), oled_get_fonts(), oled_get_current_font()
oled_set_pixel(x, y, color), oled_get_pixel(x, y), oled_draw_box(x, y, w, h), oled_set_draw_color(color)
oled_text_width(text), oled_text_height()
oled_get_framebuffer(), oled_set_framebuffer(data), oled_get_framebuffer_size()
// CHROME
ui_header(title, [right]), ui_action_bar(...), ui_chrome(...)
ui_inline_hint(x, y, hint), ui_inline_hint_right(right_x, y, hint), ui_measure_hint(hint)
// INPUT
button(id), button_pressed(id), button_held_ms(id)
joy_x(), joy_y()
BTN_RIGHT, BTN_DOWN, BTN_LEFT, BTN_UP, BTN_CONFIRM, BTN_BACK
// LEDS
led_brightness(value), led_clear(), led_fill([brightness]), led_set_pixel(x, y, brightness), led_get_pixel(x, y)
led_show_image(name), led_set_frame(rows, [brightness])
led_start_animation(name, [interval_ms]), led_stop_animation()
led_override_begin(), led_override_end()
// BACKGROUND MATRIX
matrix_app_start(callback, [interval_ms], [brightness]),
matrix_app_set_speed(interval_ms),
matrix_app_set_brightness(brightness),
matrix_app_stop(), matrix_app_active(), and
matrix_app_info().
// MOTION
imu_ready(), imu_tilt_x(),
imu_tilt_y(), imu_accel_z(),
imu_face_down(), and imu_motion().
// FEEDBACK
haptic_pulse([strength], [duration_ms], [freq_hz]),
haptic_strength([value]), haptic_off(),
tone(freq_hz, [duration_ms], [duty]),
no_tone(), and tone_playing().
// COMMS
ir_start(), ir_stop(), ir_flush()
ir_send(addr, cmd), ir_available(), ir_read()
ir_send_words(words), ir_read_words()
ir_tx_power([percent])
// IDENTITY
my_uuid() returns this badge identity. boops() returns boop state.
// CONTROL
Use exit() to return to firmware. Dev builds also expose
dev(*args). Filesystem access uses standard
open() and os APIs.
// POINTER
mouse_overlay(enable), mouse_set_bitmap(data, w, h)
mouse_x(), mouse_y(), mouse_set_pos(x, y)
mouse_clicked(), mouse_set_speed(speed), mouse_set_mode(mode)
// CONSTANTS
| Group | Constants |
|---|---|
| Buttons | BTN_RIGHT, BTN_DOWN, BTN_LEFT, BTN_UP, BTN_CIRCLE, BTN_CROSS, BTN_SQUARE, BTN_TRIANGLE, BTN_CONFIRM, BTN_SAVE, BTN_BACK, BTN_PRESETS |
| LED Images | IMG_SMILEY, IMG_HEART, IMG_ARROW_UP, IMG_ARROW_DOWN, IMG_X_MARK, IMG_DOT |
| LED Animations | ANIM_SPINNER, ANIM_BLINK_SMILEY, ANIM_PULSE_HEART |
| Mouse Modes | MOUSE_ABSOLUTE, MOUSE_RELATIVE |