stackchan-display
Loading...
Searching...
No Matches
StackChan Display

PlatformIO CI

Warning
This library is WIP (work in progress) and unstable. Breaking changes can be installed easily!

<video src="https://github-production-user-asset-6210df.s3.amazonaws.com/14128408/598185770-549d8f23-19b5-4a1a-aad7-f31dbd15b2f8.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20260526%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260526T125213Z&X-Amz-Expires=300&X-Amz-Signature=0ec3d94f839498ef60fea996151d3d9024a500fd0045fb1a1e28f94d940dfc4b&X-Amz-SignedHeaders=host&response-content-type=video%2Fmp4" controls loop></video>

StackChan display is an Arduino library to display stackchan faces. StackChan display depends on only U5Unified and drawing with it.

This library is based on stack-chan/m5stack-avatar, botamochi6277/m5stack-avatar, and m5stack/StackChan.

This Library Role for StackChan assembly

StackChan display is one of StackChan components to control a display. Even if you use this library alone, “StackChan” will not be complete.

---
config:
theme: 'redux-dark'
title: 'StackChan Architecture'
---
graph LR
planning((planning))
%% sensor inputs
camera[fas:fa-camera camera]-->|cam image|planning
touch[head touch sensor]-->planning
head_rot[head rotation sensor]-->|pan tilt angles|planning
mic[microphone]-->planning
bat[battery sensor]-->planning
%% comm inputs
esp_now[esp now]-.->planning
ble[bluetooth]-.->planning
usb[usb]-.->planning
wifi[WiFi]-.->planning
%% extra
llm[large language model]-.->wifi
%% outputs
planning-->display
subgraph display[display control]
face([face])
speech([speech bubble])
decorators([decorators])
end
display-->display_lib["display lib<br/>(M5Unified)"]
planning-->mot[motion control]
mot-->servo_lib[servo lib]
%% head neopixels on M5StackChan Head
head_led[head LED control]
planning-->head_led[head LED control]
head_led-->led_lib[LED lib]
planning-->speaker

How to use

Install this repository as an Arduino library.

Note
TODO: write install command here

Demo.ino is a demo arduino file to draw stackchan faces, please build this.



Developers Note

Differences from m5stack-avatar

These changes are to improve functionality while keeping the code concise.

  • No xTask: If you want to draw face in xtask, please register yourself.
  • No DrawingContext: It is too complex. FacialDrawable.draw() in this library uses ExpressionWeight, ColorPalette, and a few internal parameters. ExpressionWeight concept is based on ShapeKey.
  • No Avatar: "Avatar" has to control whole behaviors of stackchan including motor motions and audio behaviors. Display class in this library only controls display behaviors.

TODO for Developers

  • Increase #decorators
  • Add pictures of StackChans in the real world
  • Add autoScale() to support various M5Stack Boards
  • Add documents with doxygen
  • Add the diagram of system architecture
  • Add ellipse eyes
  • Add cluster face
  • Add Base classes for facial components
  • Add build CI tests