from SX127x.LoRa import * from SX127x.board_config import BOARD import time import RPi.GPIO as GPIO BOARD.setup() lora = LoRa() lora.set_mode(MODE.STDBY) print(lora.get_freq()) lora.set_freq(478.0) lora.set_coding_rate(CODING_RATE.CR4_6) lora.set_rx_crc(1) lora.set_register(0x1E, 0x94) print(hex(lora.get_register(0x1E))) lora.set_register(0x12, 0xff) lora.set_mode(MODE.RXCONT) lora.set_mode(MODE.RXCONT) lora.set_mode(MODE.RXCONT) value = lora.get_all_registers() print(value) print(len(value)) List = [] for i in range(0, len(value)): List.append(hex(i) + '--' + hex(value[i])) print(List)
from SX127x.LoRa import * from SX127x.board_config import BOARD BOARD.setup() lora = LoRa() lora.set_mode(MODE.STDBY) lora.set_freq(433.0) # Set the frequency to 433 MHz print 'freq = %s' % lora.get_freq() BOARD.teardown()