-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesp32-cc1101.yaml
72 lines (61 loc) · 1.84 KB
/
esp32-cc1101.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
esphome:
platformio_options:
lib_ldf_mode: "deep+" # only necessary for arduino platform
libraries:
- RadioLib
external_components:
- source:
type: git
url: https://github.com/hektor1234/esphome-radiolib-cc1101
packages:
cc1101_controls: !include cc1101-controls.yaml
spi:
# these are the default VSPI pins to use on ESP32
clk_pin: 18 # CC1001 pin 5
mosi_pin: 23 # CC1001 pin 6
miso_pin: 19 # CC1001 pin 7
# put remote_receiver first for ESP-IDF remote
remote_receiver:
- id: rf_receiver
idle: 10ms
pin:
number: 12 # This is also GDO0
allow_other_uses: true
id: cc1101_gd0_recv
# ESP IDF new remote SPECIFIC
receive_symbols: 1024
# dump: raw
remote_transmitter:
- id: rf_transmitter
pin:
number: 12 # This is also GDO0
allow_other_uses: true
id: cc1101_gd0_xmit
on_transmit:
then:
- lambda: |-
id(mycc1101).xmit();
//id(rf_transmitter).setup(); // currently necessary for legacy ESP-32 RMT (and doesn't work w/ new one either way)
on_complete:
then:
- lambda: |-
id(mycc1101).recv();
carrier_duty_percent: 100%
one_wire: true # new ESP-IDF remote code - one wire mode enables proper rx/tx loopback mode
radiolib_cc1101:
id: mycc1101
cs_pin: 5 # CC1101 pin 4
# optionally define rx_pin to allow monitoring rx rssi
rx_pin:
number: 12 # This is CC1101 GDO0 pin 3
allow_other_uses: true
# other optional settings.. (use control settings to verify they work and then set)
filter: 868khz # RX filter BW (58-812kHz)
bitrate: 40 # bitrate (0.025-600kbps)
reg_agcctrl0: 0xb2 # agcctrol0 register setting
reg_agcctrl1: 0x00 # agcctrol1 register setting
reg_agcctrl2: 0xc7 # agcctrol2 register setting
ota:
platform: esphome
on_begin:
- lambda: id(mycc1101).standby();