dmcentire
(Dennis McEntire)
November 8, 2023, 12:45am
1
Hi!
I am curious to see if this device could be used as a little screen for HA:
AtomS3 is a esp32 development kit based on esp32S3 chip, integrated WiFi function, and 8M FLASH; 0.85 inch IPS screen; Programmable button function,built-in 5V to 3.3V circuit, 6-axis gyro sensor MPU6886.This esp32 board can used as smart home...
Price: USD 15.50
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
dmcentire
(Dennis McEntire)
November 8, 2023, 4:19am
2
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!");
dmcentire
(Dennis McEntire)
November 8, 2023, 4:46am
3
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.
zoogara
(Daryl)
November 8, 2023, 5:09am
4
</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
dmcentire
(Dennis McEntire)
November 8, 2023, 5:14am
5
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:
Here’s a working config for the M5Stack Atom S3 Lite
Working RGB Leds
Working IR Led
Working button
Working status LED
dmcentire
(Dennis McEntire)
November 8, 2023, 5:24am
6
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
tom_l
November 8, 2023, 5:47am
7
Replace “G” with “GPIO”.
e.g. G15 → GPIO15, which is CS (chip select).
zoogara
(Daryl)
November 8, 2023, 5:48am
8
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.
dmcentire
(Dennis McEntire)
November 8, 2023, 3:51pm
9
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
dmcentire
(Dennis McEntire)
November 8, 2023, 9:27pm
10
Thought I was getting somewhere with the github ticket; but alas it still doesn’t work for me…
opened 03:56PM - 08 Nov 23 UTC
<!-- READ THIS FIRST:
DO NOT DELETE ANY TEXT from this template! Otherwise the… issue may be closed without a comment.
-->
**Describe the problem you have/What new integration you would like**
Hi, I am trying to get the screen to work on this device and am not having much luck. You can see my work to try and get it going in this thread:
(https://community.home-assistant.io/t/support-for-atom-s3-c123-device-with-0-85-oled-screen/637958)
I feel like I'm pretty close but so far I am not getting anything from the display to show up.
**Please describe your use case for this integration and alternatives you've tried:**
I found that the M5STACK SPI display is mentioned in [this article](https://esphome.io/components/display/ili9xxx), so I've been trying to use it but it's just not working. I think a new config/module/model for the SPI display might need to be added, but I'm not sure.
**Additional context**
My goal is to get this working with Home Assistant to use as a tiny display for data output.
zoogara
(Daryl)
November 8, 2023, 9:55pm
11
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.
dmcentire
(Dennis McEntire)
November 8, 2023, 10:23pm
12
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());
6 Likes
Horsepants
(James Cartwright)
December 12, 2023, 10:18pm
14
Thanks for doing all the hard work, this is working nicely for me too
ballakers
(Ballakers)
January 25, 2024, 1:05am
16
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!
jeffutter
(Jeffery Utter)
March 8, 2024, 4:43am
18
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
sean.p
(Sean)
March 22, 2024, 3:06pm
19
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