1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

[sx127x] Add sx127x component (#7490)

Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
This commit is contained in:
Jonathan Swoboda
2025-07-03 11:37:18 -04:00
committed by GitHub
parent 107304b274
commit 1ef7b2d64f
16 changed files with 1477 additions and 0 deletions

View 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]

View 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

View 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

View 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

View 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

View 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

View 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