Apps¶
After this page you can choose a built-in app and add your own app from the studio.
Cyber Fidget ships with 29+ built-in apps spanning games, screensavers, tools, and code examples. All apps follow the same begin/update/end lifecycle. Built-in apps are registered in the firmware; the studio adds your own apps to the menu for you.
More apps in The Archives
Beyond the built-in apps, The Archives has apps, screensavers and art made by other people. Try them in your browser and send the ones you like to your Fidget. Made something yourself? Submit it to The Archives.
Games¶
| App | Description | Key controls |
|---|---|---|
| Breakout | Classic brick-breaking game with tilt-controlled paddle | Accelerometer for paddle, Back to exit |
| Dino Run | Endless runner with jumping and ducking | Middle-Left: jump, Middle-Right: duck, slider: speed |
| Simon Says | LED + button memory pattern game with escalating difficulty | 4 directional buttons to match pattern |
| Reaction Time | Test your reaction time, press when the screen changes | Bottom right button to react, Back to return |
| Stratagem | Pattern match sequence input game | D-pad buttons (U/D/L/R), timed scoring |
| Particle Sim | SPH fluid physics simulation with gravity control | Accelerometer for gravity, slider: particle count |
| Booper | Musical tone generator / synth toy | All 6 buttons for notes, slider: volume |
| Ragdoll Fidgie | Physics puppet that idles and breathes until you knock it over -- it tumbles with realistic physics, then picks itself back up | Slider: blend pose from crouch to stretch, any face button or a shake: go ragdoll |
Media¶
| App | Description | Key controls |
|---|---|---|
| Music Player | Plays MP3s from the memory card through the speaker or a Bluetooth speaker, with visualizers and music-reactive lights. See Music Player | Enter: choose, pause/play; Left/Right: previous/next song (hold to rewind or fast-forward); Up/Down on Now Playing: visualizer; slider: volume; Back to go back |
| Voice Notes | Records voice memos to the memory card and plays them back. See Voice Notes | Enter: record/stop; Down: notes list; Up: quality; slider: volume while playing; Select to exit |
Screensavers¶
| App | Description |
|---|---|
| Matrix Screensaver | Falling matrix-style characters with column state transitions, programmatically generated |
| Boot Animation | Startup animation displayed on power-on |
| Graveyard | Animated graveyard scene (25 frames), built with Pixel Sandbox |
| Ghosts | Animated ghost graveyard scene (52 frames), built with Pixel Sandbox |
| Eye | Animated eye blink sequence (17 frames), built with Pixel Sandbox |
Tools¶
| App | Description | Key controls |
|---|---|---|
| Flashlight | Uses LEDs and display as a flashlight | Back to exit |
| Self Test | Checks controls, screen, lights and sound; keeps the last result (firmware 1.7.1 and later). See Self Test for the checks. | Follow the prompts; Enter confirms a screen or light pattern, Back marks a problem; hold Back for three seconds to abort |
| Battery Level | Shows battery state via MAX17048 fuel gauge | Back to exit |
| Slider Status | Displays slider ADC position with NeoPixel color feedback | Slider + Back |
| Clock | Time display with WiFi/NTP sync (fallback to internal timer) | Back to exit |
| Power Manager | Manually shutdown Cyber Fidget | Double-tap Bottom-Left for deep sleep |
| WiFi Manager | WiFi connection and web portal | Bottom-Left/Right to navigate |
| Home Remote | Controls lights, speakers, scenes and scripts through a Home Assistant server on your home network: favorites, rooms, brightness and colour, volume, play/pause and track skip. Set it up from the Web Portal; see Home Remote | Up/Down to choose; Enter opens a light or speaker, or runs a scene or script; hold Enter on a light, speaker, scene or script in a list to toggle the light, play or pause the speaker, or run the scene or script; Left/Right change the selected value; the slider sets brightness or volume; Back goes up a level and exits from the top list |
| Counter | Two tallies side by side. Counts are kept when the Fidget is off, and Counter reopens if the Fidget went to sleep by itself while it was open (firmware 1.7.0 or later) | Left buttons add to the left count, right buttons to the right; hold the top button on a side to zero it; Back to exit |
| Serial Display | Scrollable view of incoming serial data | Scroll buttons, toggle scroll mode |
| Accelerometer Demo | Real-time raw accelerometer data with LED color feedback | Tilt device, Back to exit |
Examples¶
These apps demonstrate individual framework features and are useful as starting points for your own apps:
| App | What it demonstrates |
|---|---|
| Font Face Demo | Font rendering options |
| Text Flow Demo | Text wrapping and flow |
| Text Alignment Demo | Text alignment modes |
| Rect Demo | Rectangle drawing primitives |
| Circle Demo | Circle drawing primitives |
| Image Demo 1-4 | Image loading and display techniques (4 variants) |
| Button Counters | Button press counting and event handling |
| Time On Counter | Elapsed time tracking |
| Progress Bar | Progress bar rendering |
Adding your own app¶
Open Code from Blank Template in the studio. It creates an app class with three methods: begin() sets up, update() draws about 50 times per second, and end() cleans up. A method is a function that belongs to a class.
Add this fragment into its .cpp file. Keep the starter's bottom-left exit button and its cleanup, including setColorsOff() in begin() and end(). The starter sets the font and alignment; this fragment clears its text and draws your greeting:
// Insert inside update(), just above display.display();
display.clear();
display.drawString(64, 24, "Hello!");
Full code for this step
This full code is for code name MyApp (create it with App Name "My App"); if your app has another code name, change MyApp and myApp to yours.
In the starter, nullptr means a pointer has no object. * in a declaration marks a pointer (an address), and before a pointer reads its object. & in a type refers to an existing object; before a value it gives its address. const means the code cannot change the value through that declaration.
#include "MyApp.h"
#include "globals.h"
#include "HAL.h"
#include "MenuManager.h"
MyApp myApp(HAL::buttonManager());
MyApp* MyApp::instance = nullptr;
MyApp::MyApp(ButtonManager& btnMgr) :
buttonManager(btnMgr), display(HAL::displayProxy()), audio(HAL::audioManager()) { instance = this; }
// begin() runs once when your app opens from the menu.
// Set things up here: hook up the buttons and start with the lights off.
void MyApp::begin() {
registerButtonCallbacks();
setColorsOff();
}
// update() runs about 50 times a second while your app is open.
// Clear the screen, draw what you want, then show it.
// The case hides about 8 pixels at each screen corner, so keep text and
// important pixels out of those corners.
void MyApp::update() {
display.clear();
display.setTextAlignment(TEXT_ALIGN_CENTER);
display.setFont(ArialMT_Plain_16);
display.drawString(64, 24, "MyApp");
display.clear();
display.drawString(64, 24, "Hello!");
display.display();
}
// end() runs when your app closes. Let go of the buttons and turn the
// lights off (if your app plays sounds, call audio.stopTone() here too).
void MyApp::end() {
unregisterButtonCallbacks();
setColorsOff();
}
// The bottom-left button closes your app and goes back to the menu.
void MyApp::onButtonBackPressed(const ButtonEvent& event) {
if (event.eventType == ButtonEvent_Released) {
instance->end();
MenuManager::instance().returnToMenu();
}
}
void MyApp::registerButtonCallbacks() {
buttonManager.registerCallback(button_BottomLeftIndex, onButtonBackPressed);
}
void MyApp::unregisterButtonCallbacks() {
buttonManager.unregisterCallback(button_BottomLeftIndex);
}
Choose the Menu Category in the studio. You do not add an APP_ENTRY or edit AppManifest.h for a studio app. Built-in firmware registration is explained in How an App Works.
See How an App Works for the full lifecycle pattern, and the Concepts section for how to use buttons, display, audio, LEDs, slider, and accelerometer in your app.
Try it in the browser first
Use the studio to write and test apps in the browser emulator before installing them on your Cyber Fidget.