The M5Stack library provides access to the built-in hardware of the M5Stack Core (including Basic and Gray) controllers.
This library is not recommended for new projects, nor for projects using M5Stack products other than Basic and Gray. See M5Unified and M5GFX for libraries that are more up-to-date and with support for many newer M5Stack products.
This library's functionality is available through the M5Stack class, referenced as M5
, including:
- LCD display via
M5.Lcd
, a customized version of the TFT_eSPI LCD library, adapted for Basic and Gray. The display resolution is 320x240 supporting 262K colors. Several fonts, graphics primitives, QR code rendering, and PNG/BMP/JPEG support are included. - Power control, including device shutoff and battery level detection via
M5.Power
and the IP5306 power management chip - Hardware buttons via
M5.BtnA
,M5.BtnB
,M5.BtnC
- Speaker, via
M5.Speaker
, supporting tones, volume control, and basic wave audio playback using ESP32's DAC function - Accelerometer, via
M5.Imu
,M5.Mpu6886
, orM5.Sh200Q
(accelerometer type depends on version of Basic/Gray)
To use the M5Stack library, #include "M5Stack.h"
must appear at the top of your sketch.
The most productive way to become acquainted with the class is through the numerous included examples. Additional documentation within this library:
Additional optional include files:
M5Faces.h
for access to M5Stack Faces accessories (EOL)LoRaWan.h
-
Hardware documentation for Gray v1.0 (EOL)
-
Hardware documentation for Basic v1.0 (EOL) Basic v2.6 (EOL) Basic v2.7. The version number may be printed on the main circuit board next to the SD card slot.
Comparison of M5Stack controllers
UIFlow Quick Start: Click Here
MicroPython API: Click Here
Arduino IDE Development: Click Here
Gray PinMap: Click Here
Basic PinMap: v1.0 (EOL) v2.6 (EOL) v2.7**
-
M5Stack-SD-Updater - Customizable menu system for M5Stack - loads apps from the Micro SD card
-
M5StackSAM - Simple Applications Menu Arduino Library for M5Stack
-
cfGUI - A simple GUI library for M5Stack (ESP32)
-
GUIslice - A lightweight GUI framework suitable for embedded displays
-
M5ez - The easy way to program on the M5Stack
-
M5Stack MultiApp Advanced - A M5Stack firmware made on PlatformIO
-
M5Stack ESP32 Oscilloscope - A fully functional oscilloscope based on ESP32 M5Stack
-
M5Stack-Avatar - An M5Stack library for rendering avatar faces
-
M5Stack_CrackScreen - Crack your M5Stack
-
M5_Shuttle_Run - M5_Shuttle_Run
-
nixietubeM5 - (Fake) Nixie Tube Display on a M5Stack
-
M5Stack_BTCTicker - A small Bitcoin price ticker using an M5Stack (ESP32) and the Coindesk API
-
M5Stack_ETHPrice - Dependence on example Wifi Setting to get ETH Price from Maicoin
-
M5Stack-PacketMonitor - M5Stack ESP32 Packet Monitor
-
M5-FFT - Graphic Equalizer on the M5Stack platform
-
M5Stack_ESP32_radio - Playing mp3 stream out of internet using M5Stack prototype
-
mp3-player-m5stack - MP3 player for M5Stack
-
ArduinoWiFiPhotoBackup - M5STACK Arduino WiFi Photo Backup device
-
M5StackHIDCtrlAltDel - You can send ctrl+alt+del to your PC via Bluetooth from M5Stack
-
M5Stack Markdown Web Server - Markdown & icons loaded from an Micro SD card/TF card to run a web page
-
M5Stack-Tetris - Tetris for M5Stack Ported to M5Stack by macsbug - https://macsbug.wordpress.com/
-
M5Stack_FlappyBird_game - M5Stack FlappyBird Playable
-
M5Stack-SpaceShooter - Space Invaders knock-off for M5Stack
-
M5Stack-Pacman-JoyPSP - Pacman on M5Stack/PSP Joypad, with sounds
-
M5Stack-Thermal-Camera - M5Stack Thermal Camera with AMG8833 thermal sensor
-
truetype2gfx - Converting fonts from TrueType to Adafruit GFX
-
m5stack-onscreen-keyboard - Full size qwerty keyboard for M5Stack