test with 1 display difinition for 2 displays

This commit is contained in:
Martijn
2024-11-15 18:24:31 +01:00
parent 810ca77dd5
commit cd98c83da8
5 changed files with 116 additions and 100 deletions
+52 -52
View File
@@ -13,7 +13,7 @@ Driver IC: ST7735S (ESPHome compatible)
1 GND 1 GND
2 3.3V 2 3.3V
3 EN 3 EN
4 IO4 Neopixel LED's 4 IO4 Neopixel LED's
5 IO5 5 IO5
6 IO6 6 IO6
7 IO7 7 IO7
@@ -24,7 +24,7 @@ Driver IC: ST7735S (ESPHome compatible)
12 IO8 12 IO8
13 IO19 13 IO19
14 IO20 14 IO20
15 IO3 Backlight main display 15 IO3 Backlight main display
16 IO46 Backlight mini displays 16 IO46 Backlight mini displays
17 IO9 17 IO9
18 IO10 18 IO10
@@ -47,8 +47,8 @@ Driver IC: ST7735S (ESPHome compatible)
35 IO42 35 IO42
36 TXD0 36 TXD0
37 RXD0 37 RXD0
38 IO1 I2C SDA > Temperature Sensor 38 IO1 I2C SDA > Temperature Sensor
39 IO2 I2S SCL > Temperature Sensor 39 IO2 I2S SCL > Temperature Sensor
40 GND 40 GND
``` ```
@@ -59,24 +59,24 @@ Driver IC: ST7735S (ESPHome compatible)
``` ```
MCP I2C address: 0x20 MCP I2C address: 0x20
PIN Description Destination PIN Description Destination
1 GND 1 GND
2 +3.3V 2 +3.3V
3 Reset ESP32 #3 EN 3 Reset ESP32 #3 EN
4 I2C SDA ESP32 #24 IO47 4 I2C SDA ESP32 #24 IO47
5 SPI MOSI ESP32 #28 IO35 5 SPI MOSI ESP32 #28 IO35
6 I2C SCK ESP32 #25 IO48 6 I2C SCK ESP32 #25 IO48
7 SPI SCK ESP32 #29 IO36 7 SPI SCK ESP32 #29 IO36
8 I2C Address MSP A0 GND 8 I2C Address MSP A0 GND
9 SPI Register select ESP32 #30 IO37 9 SPI Register select ESP32 #30 IO37
10 I2C Address MSP A1 GND 10 I2C Address MSP A1 GND
11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor) 11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor)
12 I2C Address MSP A2 GND 12 I2C Address MSP A2 GND
13 Extensionplate... 13 Extensionplate...
14 Connected with J1,2,3 14 Connected with J1,2,3
15 Main Display Backlight anode ESP32 #15 IO3 (via transistor) 15 Main Display Backlight anode ESP32 #15 IO3 (via transistor)
16 Neopixel Data OUT J1 #17 16 Neopixel Data OUT J1 #17
17 Neopixel Data IN ESP32 #4 IO4 17 Neopixel Data IN ESP32 #4 IO4
``` ```
### Connector J1 ### Connector J1
@@ -84,24 +84,24 @@ PIN Description Destination
``` ```
MCP I2C address: 0x21 MCP I2C address: 0x21
PIN Description Destination PIN Description Destination
1 GND 1 GND
2 +3.3V 2 +3.3V
3 Reset ESP32 #3 EN 3 Reset ESP32 #3 EN
4 I2C SDA ESP32 #24 IO47 4 I2C SDA ESP32 #24 IO47
5 SPI MOSI ESP32 #28 IO35 5 SPI MOSI ESP32 #28 IO35
6 I2C SCK ESP32 #25 IO48 6 I2C SCK ESP32 #25 IO48
7 SPI SCK ESP32 #29 IO36 7 SPI SCK ESP32 #29 IO36
8 I2C Address MSP A0 3.3V 8 I2C Address MSP A0 3.3V
9 SPI Register select ESP32 #30 IO37 9 SPI Register select ESP32 #30 IO37
10 I2C Address MSP A1 GND 10 I2C Address MSP A1 GND
11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor) 11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor)
12 I2C Address MSP A2 GND 12 I2C Address MSP A2 GND
13 Extensionplate... 13 Extensionplate...
14 Connected with J0,2,3 14 Connected with J0,2,3
15 Main Display Backlight anode ESP32 #15 IO3 (via transistor) 15 Main Display Backlight anode ESP32 #15 IO3 (via transistor)
16 Neopixel Data OUT J2 #17 16 Neopixel Data OUT J2 #17
17 Neopixel Data IN J0 #16 17 Neopixel Data IN J0 #16
``` ```
### Connector J2 ### Connector J2
@@ -109,24 +109,24 @@ PIN Description Destination
``` ```
MCP I2C address: 0x22 MCP I2C address: 0x22
PIN Description Destination PIN Description Destination
1 GND 1 GND
2 +3.3V 2 +3.3V
3 Reset ESP32 #3 EN 3 Reset ESP32 #3 EN
4 I2C SDA ESP32 #24 IO47 4 I2C SDA ESP32 #24 IO47
5 SPI MOSI ESP32 #28 IO35 5 SPI MOSI ESP32 #28 IO35
6 I2C SCK ESP32 #25 IO48 6 I2C SCK ESP32 #25 IO48
7 SPI SCK ESP32 #29 IO36 7 SPI SCK ESP32 #29 IO36
8 I2C Address MSP A0 GND 8 I2C Address MSP A0 GND
9 SPI Register select ESP32 #30 IO37 9 SPI Register select ESP32 #30 IO37
10 I2C Address MSP A1 3.3V 10 I2C Address MSP A1 3.3V
11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor) 11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor)
12 I2C Address MSP A2 GND 12 I2C Address MSP A2 GND
13 Extensionplate... 13 Extensionplate...
14 Connected with J0,1,3 14 Connected with J0,1,3
15 Main Display Backlight anode ESP32 #15 IO3 (via transistor) 15 Main Display Backlight anode ESP32 #15 IO3 (via transistor)
16 Neopixel Data OUT J3 #17 16 Neopixel Data OUT J3 #17
17 Neopixel Data IN J1 #16 17 Neopixel Data IN J1 #16
``` ```
### Connector J3 ### Connector J3
@@ -134,22 +134,22 @@ PIN Description Destination
``` ```
MCP I2C address: 0x23 MCP I2C address: 0x23
PIN Description Destination PIN Description Destination
1 GND 1 GND
2 +3.3V 2 +3.3V
3 Reset ESP32 #3 EN 3 Reset ESP32 #3 EN
4 I2C SDA ESP32 #24 IO47 4 I2C SDA ESP32 #24 IO47
5 SPI MOSI ESP32 #28 IO35 5 SPI MOSI ESP32 #28 IO35
6 I2C SCK ESP32 #25 IO48 6 I2C SCK ESP32 #25 IO48
7 SPI SCL ESP32 #29 IO36 7 SPI SCL ESP32 #29 IO36
8 I2C Address MSP A0 3.3V 8 I2C Address MSP A0 3.3V
9 SPI Register select ESP32 #30 IO37 9 SPI Register select ESP32 #30 IO37
10 I2C Address MSP A1 3.3V 10 I2C Address MSP A1 3.3V
11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor) 11 Mini Display Backlight anode ESP32 #16 IO46 (via transistor)
12 I2C Address MSP A2 GND 12 I2C Address MSP A2 GND
13 Extensionplate... 13 Extensionplate...
14 Connected with J0,1,2 14 Connected with J0,1,2
15 Main Display Backlight anode ESP32 #15 IO3 (via transistor) 15 Main Display Backlight anode ESP32 #15 IO3 (via transistor)
16 Neopixel Data OUT Extensionplate #5 16 Neopixel Data OUT Extensionplate #5
17 Neopixel Data IN J2 #16 17 Neopixel Data IN J2 #16
``` ```
+18 -18
View File
@@ -26,7 +26,7 @@ GP1 Display Backlight Cathode Display #11,12,13,14
GP2 Button Right GP2 Button Right
GP3 N.C. GP3 N.C.
GP4 N.C. GP4 N.C.
GP5 Display Chip Select Display #5 GP5 Display Chip Select Display #5
GP6 Button Left GP6 Button Left
GP7 Display Backlight Cathode Display #11,12,13,14 GP7 Display Backlight Cathode Display #11,12,13,14
``` ```
@@ -81,22 +81,22 @@ PIN Description
### CN2 ### CN2
``` ```
PIN Description Destination PIN Description Destination
1 GND GND 1 GND GND
2 +3.3V +3.3V 2 +3.3V +3.3V
3 Reset IC 1 #4, Display #2 3 Reset IC 1 #4, Display #2
4 I2C SI IC 1 #20 4 I2C SI IC 1 #20
5 SPI MOSI Display #6 5 SPI MOSI Display #6
6 I2C SCL IC 1 #19 6 I2C SCL IC 1 #19
7 SPI SCK Display #3 7 SPI SCK Display #3
8 I2C Address MSP A0 IC 1 #3 8 I2C Address MSP A0 IC 1 #3
9 SPI Register select Display #4 9 SPI Register select Display #4
10 I2C Address MSP A1 IC 1 #2 10 I2C Address MSP A1 IC 1 #2
11 Backlight anode Display #1 11 Backlight anode Display #1
12 I2C Address MSP A2 IC 1 #1 12 I2C Address MSP A2 IC 1 #1
13 Extensionplate... - 13 Extensionplate... -
14 Connected with J0,2,3 - 14 Connected with J0,2,3 -
15 Main Display Backlight anode - 15 Main Display Backlight anode -
16 Neopixel Data OUT - 16 Neopixel Data OUT -
17 Neopixel Data IN - 17 Neopixel Data IN -
``` ```
+21 -29
View File
@@ -94,6 +94,26 @@ light:
from: 3 from: 3
to: 3 to: 3
output:
- id: display_bar1_left
platform: gpio
internal: true
pin:
mcp23xxx: base_J3
number: 5
mode:
output: true
inverted: false
- id: display_bar1_right
platform: gpio
internal: true
pin:
mcp23xxx: base_J3
number: 1
mode:
output: true
inverted: false
display: display:
#################### ####################
### Main Display ### ### Main Display ###
@@ -121,7 +141,7 @@ display:
################## ##################
### BAR module ### ### BAR module ###
################## ##################
- id: bar1_display_left - id: bar_display
platform: ili9xxx platform: ili9xxx
model: ST7735 model: ST7735
color_order: bgr color_order: bgr
@@ -129,37 +149,9 @@ display:
dc_pin: dc_pin:
number: GPIO37 number: GPIO37
allow_other_uses: true allow_other_uses: true
cs_pin:
mcp23xxx: base_J3
number: 5
mode:
output: true
inverted: false
invert_colors: false invert_colors: false
show_test_card: false show_test_card: false
dimensions: dimensions:
height: 160 height: 160
width: 80 width: 80
offset_width: 24 offset_width: 24
rotation: 270
- id: bar1_display_right
platform: ili9xxx
model: ST7735
color_order: bgr
update_interval: never
dc_pin:
number: GPIO37
allow_other_uses: true
cs_pin:
mcp23xxx: base_J3
number: 1
mode:
output: true
inverted: false
invert_colors: false
show_test_card: false
dimensions:
height: 160
width: 80
offset_width: 24
rotation: 90
+24
View File
@@ -7,6 +7,30 @@
############################################## ##############################################
script: script:
script:
- id: update_bars
then:
- lambda: |-
// update display left:
id(display_bar1_left).turn_on();
id(bar_display).set_rotation(270);
id(bar1_left_page1).execute();
id(bar_display).update();
id(display_bar1_left).turn_off();
// update display right:
id(bar_display).set_rotation(90);
id(bar1_right_page1).execute();
id(display_bar1_right).turn_on();
id(bar_display).update();
id(display_bar1_right).turn_off();
- id: bar1_left_page1
then:
- lambda: |-
id(bar_display).image(80, 0, id(icon_temp_inside), ImageAlign::TOP_CENTER, id(orange));
- id: bar1_right_page1
then:
- lambda: |-
id(bar_display).image(80, 0, id(icon_temp_outside), ImageAlign::TOP_CENTER, id(orange));
- id: update_main - id: update_main
then: then:
- component.update: main_display - component.update: main_display
+1 -1
View File
@@ -34,7 +34,7 @@ output:
pin: GPIO46 pin: GPIO46
id: displays_mini_backlight_pwm id: displays_mini_backlight_pwm
inverted: True inverted: True
max_power: 0.4 max_power: 0.6
frequency: 500Hz frequency: 500Hz
sensor: sensor: