mega-hz
(Wolfram)
1
Hi there, i need some help with esp8266 and rc522 rfid reader:
to get more sensebility i would like to use the command
rfid.PCD_SetAntennaGain(rfid.RxGain_max);
like it is possible on arduino ide.
Can someone help me with the syntax for esphome?
Thanx, Wolfram.
mega-hz
(Wolfram)
2
doesnt have nobody an idea?
mega-hz
(Wolfram)
3
why do i get an error when trying to use spi.write?
Error Log:
Failed config
rc522_spi: [source D:\Home-Assistant\ESP_RC522_RFID.yaml:114]
- cs_pin: 0
update_interval: 0.5s
on_tag:
then:
-
Unable to find action with the name 'spi.write'.
spi.write:
- 7
- 130
- homeassistant.tag_scanned: !lambda |-
return x;
- output.turn_off: rfid_beep
- delay: 0.1s
- output.turn_on: rfid_beep
- logger.log:
format: gestempelt: %x
args:
- id(kommengehen).raw_state
level: INFO
the code part looks like this:
spi:
clk_pin: 16
miso_pin: 05
mosi_pin: 04
rc522_spi:
cs_pin: 00
update_interval: 0.5s
on_tag:
then:
- spi.write: [0x07, 0x82]
- homeassistant.tag_scanned: !lambda 'return x;'
- output.turn_off: rfid_beep
- delay: 0.1s
- output.turn_on: rfid_beep
- logger.log:
format: "gestempelt: %x"
args: ['id(kommengehen).raw_state']
level: INFO
Thsi spi.write should set the receive-gain of the rc-522 higher.