M5StickC Plus Not Working

I am trying to get the M5StickC Plus working but i get this error

Compiling .pioenvs/m5stick/lib64d/WiFi/WiFiMulti.cpp.o
src/main.cpp: In function 'void setup()':
src/main.cpp:458:3: error: reference to 'internal' is ambiguous
   internal = new remote_transmitter::RemoteTransmitterComponent(esp32_esp32internalgpiopin_4);
   ^~~~~~~~
In file included from src/esphome/components/font/font.h:3,
                 from src/esphome.h:27,
                 from src/main.cpp:3:
src/esphome/core/datatypes.h:9:11: note: candidates are: 'namespace esphome::internal { }'
 namespace internal {
           ^~~~~~~~
src/main.cpp:42:49: note:                 'esphome::remote_transmitter::RemoteTransmitterComponent* internal'
 remote_transmitter::RemoteTransmitterComponent *internal;
                                                 ^~~~~~~~
src/main.cpp:459:3: error: reference to 'internal' is ambiguous
   internal->set_component_source("remote_transmitter");
   ^~~~~~~~
In file included from src/esphome/components/font/font.h:3,
                 from src/esphome.h:27,
                 from src/main.cpp:3:
src/esphome/core/datatypes.h:9:11: note: candidates are: 'namespace esphome::internal { }'
 namespace internal {
           ^~~~~~~~
src/main.cpp:42:49: note:                 'esphome::remote_transmitter::RemoteTransmitterComponent* internal'
 remote_transmitter::RemoteTransmitterComponent *internal;
                                                 ^~~~~~~~
src/main.cpp:460:26: error: reference to 'internal' is ambiguous
   App.register_component(internal);
                          ^~~~~~~~
In file included from src/esphome/components/font/font.h:3,
                 from src/esphome.h:27,
                 from src/main.cpp:3:
src/esphome/core/datatypes.h:9:11: note: candidates are: 'namespace esphome::internal { }'
 namespace internal {
           ^~~~~~~~
src/main.cpp:42:49: note:                 'esphome::remote_transmitter::RemoteTransmitterComponent* internal'
 remote_transmitter::RemoteTransmitterComponent *internal;
                                                 ^~~~~~~~
src/main.cpp:461:3: error: reference to 'internal' is ambiguous
   internal->set_carrier_duty_percent(50);
   ^~~~~~~~
In file included from src/esphome/components/font/font.h:3,
                 from src/esphome.h:27,
                 from src/main.cpp:3:
src/esphome/core/datatypes.h:9:11: note: candidates are: 'namespace esphome::internal { }'
 namespace internal {
           ^~~~~~~~
src/main.cpp:42:49: note:                 'esphome::remote_transmitter::RemoteTransmitterComponent* internal'
 remote_transmitter::RemoteTransmitterComponent *internal;
                                                 ^~~~~~~~
/config/esphome/m5stickc.yaml: In lambda function:
/config/esphome/m5stickc.yaml:110:31: error: 'ST77XX_WHITE' was not declared in this scope
       it.print(80, 0, id(roboto), ST77XX_WHITE, TextAlign::TOP_CENTER, "M5Stick Test");
                               ^~~~~~~~~~~~
Compiling .pioenvs/m5stick/lib64d/WiFi/WiFiSTA.cpp.o
*** [.pioenvs/m5stick/src/main.cpp.o] Error 1

My yaml is this.

substitutions:
  devicename: m5stick
  upper_devicename: M5StickC

esphome:
  name: $devicename
  platform: ESP32
  board: m5stick-c
  platformio_options:
    upload_speed: 115200

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  
  ap:
    ssid: $devicename Fallback Hotspot
    password: !secret wifi_password

captive_portal:

logger:

api:

ota:

external_components:
  - source: github://martydingo/esphome-axp192
    components: [axp192]

# AXP192 power management - must be present to initialize TFT power on
sensor:
  - platform: axp192
    model: M5STICKC
    address: 0x34
    i2c_id: bus_a
    update_interval: 30s
    battery_level:
      name: "M5Stick Battery Level"
      id: "m5stick_batterylevel"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO37
      inverted: true
    name: ${upper_devicename} Button A
    on_press:
      then:
        - light.turn_on: led1
    on_release:
      then:
        - light.turn_off: led1

  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: ${upper_devicename} Button B
    on_press:
      then:
        - light.turn_on: led1
    on_release:
      then:
        - light.turn_off: led1

light:
  - platform: monochromatic
    output:  builtin_led
    name: ${upper_devicename} Led
    id: led1

output:
  - platform: ledc
    pin: 10
    inverted: true
    id: builtin_led

remote_transmitter:
  - pin:
      number: GPIO9
    carrier_duty_percent: 50%
    id: internal

spi:
  clk_pin: GPIO13
  mosi_pin: GPIO15

i2c:
   - id: bus_a
     sda: GPIO21
     scl: GPIO22
     scan: True

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 12

# 1.14 inch, 135*240 Colorful TFT LCD, ST7789v2
display:
  - platform:  st7789v
    model: TTGO TDisplay 135x240
    cs_pin: GPIO5
    dc_pin: GPIO23
    reset_pin: GPIO18
    rotation: 270
    lambda: |-
      it.print(80, 0, id(roboto), ST77XX_WHITE, TextAlign::TOP_CENTER, "M5Stick Test");

i2s_audio:
  id: bus_i2s
  i2s_lrclk_pin: G26
  i2s_bclk_pin: G0

microphone:
  - platform: i2s_audio
    i2s_din_pin: GPIO34
    i2s_audio_id: bus_i2s
    adc_type: external
    pdm: true
    id: mic

I have been trying for a while to do this so it would be wonderful if you have a idea to fix.

Did you found the solution? I have the same problem.

Sadly I haven’t. I have been trying to but haven’t got to do it.

  1. error: reference to ‘internal’ is ambiguous
    Remove or change the remote_transmitter id.
  2. error: ‘ST77XX_WHITE’ was not declared in this scope
    Define your own color and use it.
remote_transmitter:
  - pin:
      number: GPIO9
    carrier_duty_percent: 50%

color:
  - id: my_black
    red: 100%
    green: 100%
    blue: 100%
  - id: my_white
    red: 0%
    green: 0%
    blue: 0%
# 1.14 inch, 135*240 Colorful TFT LCD, ST7789v2
display:
  - platform:  st7789v
    model: TTGO TDisplay 135x240
    cs_pin: GPIO5
    dc_pin: GPIO23
    reset_pin: GPIO18
    rotation: 270
    lambda: |-
      it.fill(id(my_black));
      it.print(80, 0, id(roboto), id(my_white), TextAlign::TOP_CENTER, "M5Stick Test");

Hope this helps!

It works! Thank you so much!