diff --git a/.gitignore b/.gitignore index 57dde152..f9f86963 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ build/ .vscode/ *CMakeUserPresets*.json *.tar.gz +*env/ diff --git a/RPi/pyRF24Network/examples/temp.py b/RPi/pyRF24Network/examples/dev_test.py similarity index 77% rename from RPi/pyRF24Network/examples/temp.py rename to RPi/pyRF24Network/examples/dev_test.py index 886ab2a2..e412d0f8 100644 --- a/RPi/pyRF24Network/examples/temp.py +++ b/RPi/pyRF24Network/examples/dev_test.py @@ -23,15 +23,15 @@ network = pyRF24Network.RF24Network(radio) network.begin(90, this_node[0]) -head_out = pyRF24Network.RF24NetworkHeader(other_node[0], 0) -head_in = pyRF24Network.RF24NetworkHeader() +header = pyRF24Network.RF24NetworkHeader(other_node[0], 0) def master(count=1, interval=1): for _ in range(count): msg = bytes(range(count)) # using dynamic payload sizes count -= 1 print("message", msg, end=" ") - if network.write(head_out, msg): + header = pyRF24Network.RF24NetworkHeader(other_node[0], 0) + if network.write(header, msg): print("sent successfully") else: print("failed to transmit") @@ -45,10 +45,10 @@ def slave(timeout=10): def print_details(): radio.printPrettyDetails() - print("node address\t:", oct(this_node[0])) + print("node address\t\t=", oct(this_node[0])) -print("""\n - testing script for RF24Network python wrapper\n\n - run `master()` to transmit\n +print(""" + testing script for RF24Network python wrapper\n + run `master()` to transmit run `slave()` to receive""" ) diff --git a/RPi/pyRF24Network/examples/helloworld_rx.py b/RPi/pyRF24Network/examples/helloworld_rx.py index 0d984826..16fca037 100755 --- a/RPi/pyRF24Network/examples/helloworld_rx.py +++ b/RPi/pyRF24Network/examples/helloworld_rx.py @@ -50,10 +50,12 @@ print("payload length ", len(payload)) millis, number = struct.unpack('