Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 217f800

Browse files
Indentation fix in readme.
1 parent 4159f68 commit 217f800

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

README.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,32 @@ SX1276 module requires a number of standard SPI pins (CS, SCK, MOSI and MISO), a
4646
import utime
4747
from ulora import TTN, uLoRa
4848
# Refer to device pinout / schematics diagrams for pin details
49-
LORA_CS = const(18)
50-
LORA_SCK = const(5)
51-
LORA_MOSI = const(27)
52-
LORA_MISO = const(19)
53-
LORA_IRQ = const(26)
54-
LORA_RST = const(14)
55-
LORA_DATARATE = "SF9BW125" # Choose from several available
56-
# From TTN console for device
57-
DEVADDR = bytearray([0x00, 0x00, 0x00, 0x00])
58-
NWKEY = bytearray([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
59-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
60-
APP = bytearray([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
49+
LORA_CS = const(18)
50+
LORA_SCK = const(5)
51+
LORA_MOSI = const(27)
52+
LORA_MISO = const(19)
53+
LORA_IRQ = const(26)
54+
LORA_RST = const(14)
55+
LORA_DATARATE = "SF9BW125" # Choose from several available
56+
# From TTN console for device
57+
DEVADDR = bytearray([0x00, 0x00, 0x00, 0x00])
58+
NWKEY = bytearray([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
59+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
60+
APP = bytearray([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])
6262
TTN_CONFIG = TTN(DEVADDR, NWKEY, APP, country="EU")
63-
FPORT = 1
64-
lora = uLoRa(
65-
cs=LORA_CS,
66-
sck=LORA_SCK,
67-
mosi=LORA_MOSI,
68-
miso=LORA_MISO,
69-
irq=LORA_IRQ,
70-
rst=LORA_RST,
71-
ttn_config=TTN_CONFIG,
72-
datarate=LORA_DATARATE,
73-
fport=FPORT
74-
)
63+
FPORT = 1
64+
lora = uLoRa(
65+
cs=LORA_CS,
66+
sck=LORA_SCK,
67+
mosi=LORA_MOSI,
68+
miso=LORA_MISO,
69+
irq=LORA_IRQ,
70+
rst=LORA_RST,
71+
ttn_config=TTN_CONFIG,
72+
datarate=LORA_DATARATE,
73+
fport=FPORT
74+
)
7575
# ...Then send data as bytearray
7676
lora.send_data(data, len(data), lora.frame_counter)
7777

0 commit comments

Comments
 (0)