Support for ATOM-S3 C123 device with 0.85 OLED screen

Hi!

I am curious to see if this device could be used as a little screen for HA:

I was able to get it connected to HA using a script for the ATOM-S3 LITE, which is just an RGB LED instead of a screen, but of course it only has the button device (which works) and no RGB led that can be controlled since it’s a screen.

Anybody else work on this unit at all? Just looking for the esphome yaml that might support the screen.

I’m going to give it a go as well based on a regular SPI screen, from this link as a starting point.

Thanks for anyone’s input!

Dennis

Does anyone know how to translate the “G” pins in this diagram to the actual “Dx” pins I need to assign in the yaml file for the screen?

Example yaml code for an SPI screen:

# Example configuration entry
spi:
  clk_pin: D0
  mosi_pin: D1

display:
  - platform: ssd1327_spi
    model: "SSD1327 128x128"
    cs_pin: D2
    dc_pin: D3
    reset_pin: D4
    lambda: |-
      it.print(0, 0, id(font), "Hello World!");

OK, the syntax is GPIO instead of D so I got that. Now it’s just a matter of finding the right ESP32 board ID. I’ve tried several with no luck but I’ll keep looking.

</s> <s> platform: ESP32</s> <s> board: m5stack-atom</s> <s>

or

</s> <s> platform: ESP32</s> <s> board: m5stack-core-esp32</s> <s>

Have been reported to work…

No personal experience with this though.

Edit: Above is for the ATOM, not ATOM S3

Try:

  platform: ESP32
  board: esp32-s3-devkitc-1

Thanks, I tried those and they both get the same error I get with all the other m5stack boards:

The button on the unit is GPIO41 and it throws this error.
Invalid pin number: 41 (must be 0-39)

The only board ID that seems to allow it is:
esp32-s3-devkitc-1

Which I got from this post:

My main problem is translating these two pieces of data. One is from the Atom S3 datasheet and the other is from the esphome page for SPI displays:

G15 CS
G16 BL
G17 SCK
G21 MOSI (got this one!)
G33 RS
G34 LCD-RST

clk_pin
mosi_pin
reset_pin
cs_pin
dc_pin

Assumptions: SCK is clk_pin? How about LCD-RST is reset_pin? The others I don’t know.

Also, kind of a big deal is the platform type. I am not sure if it’s even supported…

display:
  - platform: ssd1351_spi
    model: "SSD1351 128x128"

Is not what’s listed on the datasheet. It says N085-1212TBWIG06-C08

Replace “G” with “GPIO”.

e.g. G15 → GPIO15, which is CS (chip select).

G15 CS cs_pin
G16 BL backlight?
G17 SCK clk_pin
G21 MOSI (got this one!)
G33 RS register select (usually not needed)
G34 LCD-RST. reset

Try it and see - if it doesn’t work jump on the ESPHome GitHub issues register or feature requests and see if someone is adding support or logged a request.

I think I’ve spent way too much time experimenting with no results. Here’s my update:

talks about the m5stack option, so I’ve tried this:

color:
  - id: my_red
    red: 100%
    green: 3%
    blue: 5%

spi:
  clk_pin: GPIO17
  mosi_pin: GPIO21

output:
  - platform: ledc
    pin: 16
    id: gpio_32_backlight_pwm

display:
  - platform: ili9xxx
    model: M5STACK
    dc_pin: GPIO37
    cs_pin: GPIO15
    reset_pin: GPIO34
    lambda: |-
      it.rectangle(0,  0, it.get_width(), it.get_height(), id(my_red));

but of course it does nothing. I’ve been reading (not actually, it’s in Chinese) the manual linked from the ATOM S3 page, seen here, to see if it talks about which pin to use for the DC_PIN option.

The manual has “VDD_SPI” listed in a bunch of places, and using my phone and google translate I can read some of it, but it’s still unclear. There’s GPIO45 which is a VDD_SPI strapping pin, not sure what that it but it didn’t work either.

Also, rather than display text I’m just trying to make the display show red. I think it also might be that I am not controlling the backlight properly, which would make the display look dark as well. Not sure there, I added some lines to try and turn it on in the code above.

I’ll probably give up and reach out as you recommended to see if there’s going to be any support, and I’ll let someone smarter than me figure it out :slight_smile:

Thought I was getting somewhere with the github ticket; but alas it still doesn’t work for me…

Bummer. I always find that problems like this are a good excuse to practice my C++ and Arduino (or IDF) skills.

You could still have a device that does what you want using the supplied example code and some MQTT.

OMG got it working… Here’s the config:

esphome:
  name: atoms3

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

wifi:
  ssid: ******
  password: ******

api:
  encryption:
    key: ******

ota:
  password: ******

#G4=IR
remote_transmitter:
  pin: GPIO4
  carrier_duty_percent: 50%

#G41=Button
binary_sensor:
  - platform: gpio
    name: Button
    pin:
      number: GPIO41
      inverted: true
      mode:
        input: true
        pullup: true
    filters:
      - delayed_off: 10ms
    on_press:
      then:
        - logger.log: Button Pressed

font:
  - file: "gfonts://Roboto"
    id: font_default
    size: 24

color:
  - id: my_red
    red: 100%
    green: 3%
    blue: 5%

time:
  platform: homeassistant
  id: ha_time

spi:
  clk_pin: 17
  mosi_pin: 21

display:
  - platform: st7789v
    id: display_tft
    model: Custom
    height: 128
    width: 128
    rotation: 180
    offset_height: 2
    offset_width: 1
    backlight_pin: 16
    cs_pin: 15
    dc_pin: 33
    reset_pin: 34
    eightbitcolor: true
    update_interval: 30s
    lambda: |-
      it.strftime(64, 0, id(font_default), TextAlign::TOP_CENTER, "%l:%M %p", id(ha_time).now());
7 Likes

1 Like

Thanks for doing all the hard work, this is working nicely for me too

Good job. Thx alot!

Just doing my research and about to flash my new device here. I noticed you are using the st7789v platform for the screen. Did the recommended one ili9xxx component not work / FYI here for you:


I am also going to try and get the MPU6886 going also since that’s also an espHome component already too!
Happy Tinkering!

I managed to get the screen to work for me with the ili9xxx driver with the following settings:

display:
  - platform: ili9xxx
    model: ST7789V
    id: display_tft
    dimensions:
      height: 128
      width: 128
      offset_height: 1
      offset_width: 2
    invert_colors: true
    rotation: 180
    cs_pin: 15
    dc_pin: 33
    reset_pin: 34
    ...

output:
  - platform: ledc
    pin: 16
    min_power: 0.65
    max_power: 0.99
    zero_means_zero: true
    id: backlightdim

light:
  - platform: monochromatic
    output: backlightdim
    restore_mode: RESTORE_DEFAULT_ON
    name: "Backlight"
    id: backlightlight

I’ve just received one of these fascinating devices, and I am struggling to adopt it in HA after configuring it for first use in ESPweb. I can browse to the device, and I can see it in HA. I get the following when trying to adopt.

any ideas?

1 Like

Hello,
do you happen to know if I can add like transmission status on that mini display when using YAML config and RS485 tail? I would like to see at least the device is doing something. Or wifi connect status and RS485 pin status ?

Hello I have an ESP32 S3 Atom Lite and since the ESPHOME 8.0 version it has been introduced the LVGL and I have lost screen display Have you seen this problem? THANKS