platform-espressif32 icon indicating copy to clipboard operation
platform-espressif32 copied to clipboard

add m5stamp-c3 board

Open jcgruenhage opened this issue 3 years ago • 11 comments

fixes #670

I have never done this before, so if I'm doing this very wrong, please tell me. I have not found any documentation on how to do this though.

I've based this on the esp32-c3-devkitm-1.json board, most stuff is unchanged.

jcgruenhage avatar Feb 09 '22 10:02 jcgruenhage

After some help on the ESPHome Discord, I've gotten this to work. The now updated version of this PR successfully boots into ESPHome using the following config:

esphome:
  name: m5stamp-c3

esp32:
  board: m5stamp-c3
  variant: esp32c3
  framework:
    type: esp-idf
    platform_version: https://github.com/jcgruenhage/platform-espressif32#m5stamp-c3

logger:
  level: DEBUG

jcgruenhage avatar Feb 09 '22 21:02 jcgruenhage

Is there a way to manually include this until it is merged and released?

pho3nixf1re avatar Jul 03 '22 01:07 pho3nixf1re

I managed to figure this out (I think, not fully tested) by following the instructions here on creating custom boards. Hopefully it works. Would be really great if this could be merged officially.

pho3nixf1re avatar Jul 03 '22 03:07 pho3nixf1re

any updates on merging this pull request?

arrowcircle avatar Jul 19 '22 07:07 arrowcircle

Hi, any progress on this? I'm trying to use this PR with arduino framework.

martin31821 avatar Oct 02 '23 17:10 martin31821

I've rebased this and this is working for me, including arduino support:

esphome:
  name: ${device_host}
  platformio_options:
    platform_packages:
      - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.14
    platform:
      - https://github.com/jcgruenhage/platform-espressif32.git#m5stamp-c3
  on_boot:
    then:
      - light.turn_on:
          id: "${device_id}_led"
          red: 80%
          green: 0%
          blue: 100%

esp32:
  board: m5stamp-c3
  variant: esp32c3
  framework:
    type: arduino

binary_sensor:
  - platform: gpio
    pin: 3
    name: "${device_name} Button"
    id: "${device_id}_button"
    on_click:
      then:
        - light.toggle:
            id: "${device_id}_led"

light:
  - platform: neopixelbus
    id: "${device_id}_led"
    type: GRB
    variant: SK6812
    method: ESP32_RMT_1
    num_leds: 1
    pin: 2
    name: "${device_name} Led"

Can we finally get this merged? It's been nearly two years now.

jcgruenhage avatar Feb 07 '24 21:02 jcgruenhage

@valeros Board is supported in Arduino espressif32 https://github.com/espressif/arduino-esp32/blob/master/variants/m5stack_stamp_c3/pins_arduino.h

Jason2866 avatar Feb 07 '24 21:02 Jason2866

@Jason2866 This variant is not available in the latest stable 2.0.14. Furthermore, it seems that the m5stick_c variant was renamed to m5stack_stamp_c3, but these are two different boards, aren't they?

valeros avatar Feb 08 '24 12:02 valeros

Ahh, yes board m5stack_stamp_c3 is added in Arduino master. The board m5stick_c was renamed to m5stack_stickc. Oh my this boards mess, who ever thought it is a good idea to set boards specific settings via a boards name....

Is there work done or planned to add a boards settings generator? Not just for espressif boards, a general solution?

Most issues here and for users is this boards mess...

Jason2866 avatar Feb 08 '24 13:02 Jason2866