Python Ebyte E32
1.0.0
usage: ebyte.py read [-h] serial pin_m0 pin_m1 pin_aux
positional arguments:
serial Path to the serial port device.
pin_m0 M0 GPIO pin number.
pin_m1 M1 GPIO pin number.
pin_aux AUX GPIO pin number.
optional arguments:
-h, --help show this help message and exit
python ebyte.py read /dev/serial0 27 17 22
Version:
--------
Frequency: 868MHz
Version: 13
Features: 20
Address/channel:
----------------
addh: 0x00
addl: 0x02
address: 0x0002
chan: 0x02
sped:
-----
parity_bit: 8N1 (0)
uart_baud: 19200 (3)
air_data_rate: 2.4k (2)
option:
-------
transmission_mode: fixed (1)
io_drive_mode: TXD, RXD and AUX open-collector (1)
wake_up_time: 250ms (0)
fec_switch: on (1)
transmission_power: 30dBm (0)
python ebyte.py write /dev/serial0 27 17 22 --fec_switch=1 --chan=15
python ebyte.py reset /dev/serial0 27 17 22
자신의 코드에서 라이브러리를 사용하려면 test_raspberrypi.py의 코드를 참조하십시오. 직렬 장치에 편지를 쓰면 쓰기마다 ebyte.wait_for_aux_pin ()에게 전화하십시오. aux_pin 매개 변수를 생략 할 수 있습니다. 그런 다음 핀이 높을 때까지 대기하는 대신 지연이 사용됩니다.