Skip to content

Commit

Permalink
Merge pull request #541 from bramoosterhuis/dev/m5stack-atom-support
Browse files Browse the repository at this point in the history
Add support for m5stack atom boards
  • Loading branch information
forkineye authored Jun 14, 2022
2 parents 26ec316 + ea882a3 commit 65607da
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
# DEVKITC
- target: "esp32_devkitc"
chip: "esp32"
# M5Stack Atom
- target: "m5stack_atom"
chip: "esp32"

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions ESPixelStick/src/GPIO_Defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ typedef enum
# include "platformDefinitions/GPIO_Defs_ESP32_LoLin_D32_PRO_ETH.hpp"
#elif defined (BOARD_ESP32_LOLIN_D32_PRO)
# include "platformDefinitions/GPIO_Defs_ESP32_LoLin_D32_PRO.hpp"
#elif defined (BOARD_ESP32_M5STACK_ATOM)
# include "platformDefinitions/GPIO_Defs_ESP32_M5Stack_Atom.hpp"
#elif defined (BOARD_ESP32_MH_ET_LIVE_MiniKit)
# include "platformDefinitions/GPIO_Defs_ESP32_MH_ET_LIVE_MiniKit.hpp"
#elif defined (BOARD_ESP32_QUINLED_QUAD_ETH)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#pragma once
/*
* GPIO_Defs_ESP32_M5Stack_Atom.hpp - Output Management class
*
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
* Copyright (c) 2021 Shelby Merrick
* http://www.forkineye.com
*
* This program is provided free for you to use in any way that you wish,
* subject to the laws and regulations where you are using it. Due diligence
* is strongly suggested before using this code. Please give credit where due.
*
* The Author makes no warranty of any kind, express or implied, with regard
* to this program or the documentation contained in this document. The
* Author shall not be liable in any event for incidental or consequential
* damages in connection with, or arising out of, the furnishing, performance
* or use of these programs.
*
*/

/*
* M5Stack Atom driver, boards are ESP32-PICO-D4 based, no PSRAM
*
* Note: These boards lack PSRAM. So if you need more outputs, you probably need to
* raise the WebSocketFrameCollectionBufferSize a bit e.g. 12*1024. Otherwise you'll
* face an issue that the webUI is not rendering the output configutation section.
*
* Tested:
* - Atom Lite
* - Atom Matrix
*/

// Output Manager
#define SUPPORT_UART_OUTPUT
// Bottom extension interface
#define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_19 // TxD for RS485 Base
#define UART_LAST OutputChannelId_UART_1

#define SUPPORT_RMT_OUTPUT

// Internal neopixel(s)
#define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_27

// Bottom extension interface
#define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_22
#define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_23
#define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_33

// GROVE extension interface
#define DEFAULT_RMT_4_GPIO gpio_num_t::GPIO_NUM_26 // TxD for RS485 Tail
//#define DEFAULT_RMT_5_GPIO gpio_num_t::GPIO_NUM_32 // disabled by default due to memory contraints.
#define RMT_LAST OutputChannelId_RMT_5

// Bottom extension interface
// Disabled by default, on Atom Matrix I2C is shared with a 6-Axis IMU (MPU-6886)
// #define DEFAULT_I2C_SDA gpio_num_t::GPIO_NUM_25
// #define DEFAULT_I2C_SCL gpio_num_t::GPIO_NUM_21

// File Manager - Defnitions must be present even if SD is not supported
// #define SUPPORT_SD
#define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12
#define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13
#define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14
#define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_15

// Output Types
// Not Finished - #define SUPPORT_OutputType_TLS3001
// #define SUPPORT_OutputType_APA102 // SPI
#define SUPPORT_OutputType_DMX // UART
#define SUPPORT_OutputType_GECE // UART
#define SUPPORT_OutputType_GS8208 // UART / RMT
#define SUPPORT_OutputType_Renard // UART
#define SUPPORT_OutputType_Serial // UART
#define SUPPORT_OutputType_TM1814 // UART / RMT
#define SUPPORT_OutputType_UCS1903 // UART / RMT
#define SUPPORT_OutputType_UCS8903 // UART / RMT
// #define SUPPORT_OutputType_WS2801 // SPI
#define SUPPORT_OutputType_WS2811 // UART / RMT
#define SUPPORT_OutputType_Relay // GPIO
// Disabled by default, on Atom Matrix I2C is shared with a 6-Axis IMU (MPU-6886)
// #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins)
9 changes: 8 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; Local configuration should be done in platformio_user.ini

[platformio]
default_envs = espsv3, d1_mini, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp01s, d1_mini_mhetesp32minikit, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc
default_envs = espsv3, d1_mini, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp01s, d1_mini_mhetesp32minikit, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc, m5stack_atom
src_dir = ./ESPixelStick
data_dir = ./ESPixelStick/data
build_cache_dir = ./.pio/.buildcache
Expand Down Expand Up @@ -280,3 +280,10 @@ build_flags =
${esp32git.build_flags}
-D BOARD_ESP32_DEVKITC

;M5Stack Atom Lite/Matrix
[env:m5stack_atom]
extends = esp32git
board = m5stack-atom
build_flags =
${esp32git.build_flags}
-D BOARD_ESP32_M5STACK_ATOM

0 comments on commit 65607da

Please sign in to comment.