mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-29 22:24:26 +00:00 
			
		
		
		
	Add support for using BMP280 with SPI (#7053)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
		| @@ -1,15 +0,0 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 5 | ||||
|     sda: 4 | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
| @@ -1,15 +0,0 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 5 | ||||
|     sda: 4 | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
| @@ -1,15 +0,0 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 16 | ||||
|     sda: 17 | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
| @@ -1,15 +0,0 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 5 | ||||
|     sda: 4 | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
| @@ -1,15 +0,0 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 5 | ||||
|     sda: 4 | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
| @@ -1,15 +1,17 @@ | ||||
| i2c: | ||||
|   - id: i2c_bmp280 | ||||
|     scl: 16 | ||||
|     sda: 17 | ||||
|     scl: ${scl_pin} | ||||
|     sda: ${sda_pin} | ||||
| 
 | ||||
| sensor: | ||||
|   - platform: bmp280 | ||||
|   - platform: bmp280_i2c | ||||
|     i2c_id: i2c_bmp280 | ||||
|     address: 0x77 | ||||
|     temperature: | ||||
|       id: bmp280_temperature | ||||
|       name: Outside Temperature | ||||
|       oversampling: 16x | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|       id: bmp280_pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO16 | ||||
|   sda_pin: GPIO17 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO5 | ||||
|   sda_pin: GPIO4 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO5 | ||||
|   sda_pin: GPIO4 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO16 | ||||
|   sda_pin: GPIO17 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO5 | ||||
|   sda_pin: GPIO4 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										5
									
								
								tests/components/bmp280_i2c/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/components/bmp280_i2c/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| substitutions: | ||||
|   scl_pin: GPIO5 | ||||
|   sda_pin: GPIO4 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										18
									
								
								tests/components/bmp280_spi/common.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								tests/components/bmp280_spi/common.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| spi: | ||||
|   - id: spi_bmp280 | ||||
|     clk_pin: ${clk_pin} | ||||
|     mosi_pin: ${mosi_pin} | ||||
|     miso_pin: ${miso_pin} | ||||
|  | ||||
| sensor: | ||||
|   - platform: bmp280_spi | ||||
|     spi_id: spi_bmp280 | ||||
|     cs_pin: ${cs_pin} | ||||
|     temperature: | ||||
|       id: bmp280_temperature | ||||
|       name: Outside Temperature | ||||
|     pressure: | ||||
|       name: Outside Pressure | ||||
|       id: bmp280_pressure | ||||
|     iir_filter: 16x | ||||
|     update_interval: 15s | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO16 | ||||
|   mosi_pin: GPIO17 | ||||
|   miso_pin: GPIO15 | ||||
|   cs_pin: GPIO5 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO6 | ||||
|   mosi_pin: GPIO7 | ||||
|   miso_pin: GPIO5 | ||||
|   cs_pin: GPIO8 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO6 | ||||
|   mosi_pin: GPIO7 | ||||
|   miso_pin: GPIO5 | ||||
|   cs_pin: GPIO8 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO16 | ||||
|   mosi_pin: GPIO17 | ||||
|   miso_pin: GPIO15 | ||||
|   cs_pin: GPIO5 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO14 | ||||
|   mosi_pin: GPIO13 | ||||
|   miso_pin: GPIO12 | ||||
|   cs_pin: GPIO15 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										7
									
								
								tests/components/bmp280_spi/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/components/bmp280_spi/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO2 | ||||
|   mosi_pin: GPIO3 | ||||
|   miso_pin: GPIO4 | ||||
|   cs_pin: GPIO5 | ||||
|  | ||||
| <<: !include common.yaml | ||||
		Reference in New Issue
	
	Block a user