mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-03 16:41:50 +00:00 
			
		
		
		
	Co-authored-by: Dennis Marinus <dmarinus@apple.com> Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
		
			
				
	
	
		
			53 lines
		
	
	
		
			978 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			978 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
spi:
 | 
						|
  - id: spi_ft63x6
 | 
						|
    clk_pin: ${clk_pin}
 | 
						|
    mosi_pin: ${mosi_pin}
 | 
						|
 | 
						|
i2c:
 | 
						|
  - id: i2c_ft63x6
 | 
						|
    scl: ${scl_pin}
 | 
						|
    sda: ${sda_pin}
 | 
						|
 | 
						|
display:
 | 
						|
  - platform: ssd1306_i2c
 | 
						|
    id: ssd1306_display
 | 
						|
    model: SSD1306_128X64
 | 
						|
    reset_pin: ${reset_pin}
 | 
						|
    pages:
 | 
						|
      - id: page1
 | 
						|
        lambda: |-
 | 
						|
          it.rectangle(0, 0, it.get_width(), it.get_height());
 | 
						|
 | 
						|
touchscreen:
 | 
						|
  - platform: ft63x6
 | 
						|
    interrupt_pin: ${interrupt_pin}
 | 
						|
    transform:
 | 
						|
      swap_xy: true
 | 
						|
      mirror_x: false
 | 
						|
      mirror_y: true
 | 
						|
    on_touch:
 | 
						|
      - logger.log:
 | 
						|
          format: tp touched
 | 
						|
    on_update:
 | 
						|
      - logger.log:
 | 
						|
          format: to updated
 | 
						|
    on_release:
 | 
						|
      - logger.log:
 | 
						|
          format: to released
 | 
						|
    calibration:
 | 
						|
      x_min: 0
 | 
						|
      x_max: 320
 | 
						|
      y_min: 0
 | 
						|
      y_max: 400
 | 
						|
 | 
						|
binary_sensor:
 | 
						|
  - platform: touchscreen
 | 
						|
    name: Bottom Left Touch
 | 
						|
    use_raw: true
 | 
						|
    x_min: 0
 | 
						|
    x_max: 100
 | 
						|
    y_min: 400
 | 
						|
    y_max: 480
 | 
						|
    on_press:
 | 
						|
      logger.log: Left pressed
 |