Skip to content

Commit 01e6bfe

Browse files
committed
added some information
1 parent 7e48379 commit 01e6bfe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

content/tutorials/networks/lora/module-module.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aliases:
66
- chapter/tutorials/lora/module-module
77
---
88

9-
This example shows how to connect two Pycode LoRa capable modules (nodes) via raw LoRa.
9+
This example shows how to connect two Pycom LoRa capable modules (nodes) via raw LoRa. **Node A** will continuously send a packet containing `Ping`. Once **Node B** receives such a packet, it will respond with `Pong`. You will see the count messages appear in the REPL. You can adapt this example to have mutual communication between two LoRa nodes.
1010

1111
## Node A
1212

@@ -22,10 +22,9 @@ s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
2222
s.setblocking(False)
2323
i = 0
2424
while True:
25-
if s.recv(64) == b'Ping':
26-
s.send('Pong')
27-
print('Pong {}'.format(i))
28-
i = i+1
25+
s.send('Ping')
26+
print('Ping {}'.format(i))
27+
i= i+1
2928
time.sleep(5)
3029
```
3130

@@ -43,9 +42,10 @@ s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
4342
s.setblocking(False)
4443
i = 0
4544
while True:
46-
s.send('Ping')
47-
print('Ping {}'.format(i))
48-
i= i+1
45+
if s.recv(64) == b'Ping':
46+
s.send('Pong')
47+
print('Pong {}'.format(i))
48+
i = i+1
4949
time.sleep(5)
5050
```
5151

0 commit comments

Comments
 (0)