mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[sx127x] Add sx127x component (#7490)
Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
This commit is contained in:
		
							
								
								
									
										45
									
								
								tests/components/sx127x/common.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								tests/components/sx127x/common.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| spi: | ||||
|   clk_pin: ${clk_pin} | ||||
|   mosi_pin: ${mosi_pin} | ||||
|   miso_pin: ${miso_pin} | ||||
|  | ||||
| sx127x: | ||||
|   cs_pin: ${cs_pin} | ||||
|   rst_pin: ${rst_pin} | ||||
|   dio0_pin: ${dio0_pin} | ||||
|   pa_pin: BOOST | ||||
|   pa_power: 17 | ||||
|   pa_ramp: 40us | ||||
|   bitsync: true | ||||
|   bitrate: 4800 | ||||
|   bandwidth: 50_0kHz | ||||
|   frequency: 433920000 | ||||
|   modulation: FSK | ||||
|   deviation: 5000 | ||||
|   rx_start: true | ||||
|   rx_floor: -90 | ||||
|   packet_mode: true | ||||
|   payload_length: 8 | ||||
|   sync_value: [0x33, 0x33] | ||||
|   shaping: NONE | ||||
|   preamble_size: 2 | ||||
|   preamble_detect: 2 | ||||
|   preamble_errors: 8 | ||||
|   preamble_polarity: 0x55 | ||||
|   on_packet: | ||||
|     then: | ||||
|       - sx127x.send_packet: | ||||
|           data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C] | ||||
|  | ||||
| button: | ||||
|   - platform: template | ||||
|     name: "SX127x Button" | ||||
|     on_press: | ||||
|       then: | ||||
|         - sx127x.set_mode_standby | ||||
|         - sx127x.run_image_cal | ||||
|         - sx127x.set_mode_tx | ||||
|         - sx127x.set_mode_sleep | ||||
|         - sx127x.set_mode_rx | ||||
|         - sx127x.send_packet: | ||||
|             data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C] | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.esp32-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO5 | ||||
|   mosi_pin: GPIO27 | ||||
|   miso_pin: GPIO19 | ||||
|   cs_pin: GPIO18 | ||||
|   rst_pin: GPIO23 | ||||
|   dio0_pin: GPIO26 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.esp32-c3-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO5 | ||||
|   mosi_pin: GPIO18 | ||||
|   miso_pin: GPIO19 | ||||
|   cs_pin: GPIO1 | ||||
|   rst_pin: GPIO2 | ||||
|   dio0_pin: GPIO3 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.esp32-c3-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO5 | ||||
|   mosi_pin: GPIO18 | ||||
|   miso_pin: GPIO19 | ||||
|   cs_pin: GPIO1 | ||||
|   rst_pin: GPIO2 | ||||
|   dio0_pin: GPIO3 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.esp32-idf.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO5 | ||||
|   mosi_pin: GPIO27 | ||||
|   miso_pin: GPIO19 | ||||
|   cs_pin: GPIO18 | ||||
|   rst_pin: GPIO23 | ||||
|   dio0_pin: GPIO26 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.esp8266-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO5 | ||||
|   mosi_pin: GPIO13 | ||||
|   miso_pin: GPIO12 | ||||
|   cs_pin: GPIO1 | ||||
|   rst_pin: GPIO2 | ||||
|   dio0_pin: GPIO3 | ||||
|  | ||||
| <<: !include common.yaml | ||||
							
								
								
									
										9
									
								
								tests/components/sx127x/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/components/sx127x/test.rp2040-ard.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| substitutions: | ||||
|   clk_pin: GPIO2 | ||||
|   mosi_pin: GPIO3 | ||||
|   miso_pin: GPIO4 | ||||
|   cs_pin: GPIO5 | ||||
|   rst_pin: GPIO6 | ||||
|   dio0_pin: GPIO7 | ||||
|  | ||||
| <<: !include common.yaml | ||||
		Reference in New Issue
	
	Block a user