Ligne 239 : |
Ligne 239 : |
| {{ambox|text=IF the file {{fname|test_receiver.py}} is copied to the micropython board THEN it can be started from REPL<br />with {{fname|import test_receiver}} }} | | {{ambox|text=IF the file {{fname|test_receiver.py}} is copied to the micropython board THEN it can be started from REPL<br />with {{fname|import test_receiver}} }} |
| | | |
− | == The Emitter == | + | == The Emitter (CanSat) == |
| The emitter can be made 2 different ways (shown below). | | The emitter can be made 2 different ways (shown below). |
| | | |
Ligne 246 : |
Ligne 246 : |
| Only the script content will changes between the emitter and the receiver. | | Only the script content will changes between the emitter and the receiver. |
| | | |
− | === Wiring option 1 : as the receiver === | + | === Emitter Wiring 1 : as the receiver === |
| wiring (visible here before) is identical to the receiver wiring. | | wiring (visible here before) is identical to the receiver wiring. |
| | | |
Ligne 253 : |
Ligne 253 : |
| (see the [[ENG-CANSAT-PICO-RFM69HCW-TEST#Wiring|Receiver]] section for more details about the connections). | | (see the [[ENG-CANSAT-PICO-RFM69HCW-TEST#Wiring|Receiver]] section for more details about the connections). |
| | | |
− | === Wiring option 2: with the Kit Cansat for Pico === | + | === Emitter Wiring 2: with the Kit Cansat for Pico === |
| {{pl|2271|Kit Cansat avec Raspberry-Pi Pico}} have a Raspberry-Pi Pico soldered onboard. The RFM69 module can be soldered on the UEXT connection points available between the Pico and the Ribbon connector. | | {{pl|2271|Kit Cansat avec Raspberry-Pi Pico}} have a Raspberry-Pi Pico soldered onboard. The RFM69 module can be soldered on the UEXT connection points available between the Pico and the Ribbon connector. |
| | | |
Ligne 311 : |
Ligne 311 : |
| {{traduction}} | | {{traduction}} |
| | | |
− | === The code === | + | === Emitter code === |
− | Now we will load and executes the {{fname|test_emitter.py}} emitter script. The script must be downloaded from the repository. | + | Now we will load and executes the {{fname|test_emitter.py}} emitter script for the CanSat. |
| + | |
| + | The script must be downloaded from the repository. |
| | | |
| {{traduction}} | | {{traduction}} |
Ligne 333 : |
Ligne 335 : |
| * The '''frequency''' used by the receiver RFM69HCW must be exactly the same as the emitter! | | * The '''frequency''' used by the receiver RFM69HCW must be exactly the same as the emitter! |
| * The '''Encryption key''' used by the receiver RFM69HCW must be exactly the same as the emitter! | | * The '''Encryption key''' used by the receiver RFM69HCW must be exactly the same as the emitter! |
− | * The '''Node ID''' is unique node identifier (0..255). This also the node ID where the base station (the receiver) must send the ACK the response.
| |
− | * The '''BaseStation ID''' the node id (0..255) where the emitter must sent the messages (and from which the ACK response are espected).
| |
| | | |
− | Locate the following lignes: | + | Locate the following lines: |
| | | |
| <syntaxhighlight lang="python">FREQ = 433.1 | | <syntaxhighlight lang="python">FREQ = 433.1 |
| ENCRYPTION_KEY = b"\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08" | | ENCRYPTION_KEY = b"\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08" |
− | NODE_ID = 100 # ID of this node
| |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
| And update the value for '''FREQ''' and '''ENCRYPTION_KEY'''. | | And update the value for '''FREQ''' and '''ENCRYPTION_KEY'''. |
| | | |
− | The NODE_ID doesn't have to be updated, its is used as node identifier allowing message & ACK exchange between one receiver and several emitter (each having an unique NODE_ID (for the same ENCRYPTION_KEY and FREQ). | + | {{underline|'''Update BaseStation ID:'''}} |
| + | * The '''Node ID''' is unique node identifier (0..255). This also the node ID where the base station (the receiver) must send the ACK the response. |
| + | * The '''BaseStation ID''' the node id (0..255) where the CanSat emitter must sent the messages (and from which the ACK response are expected). |
| + | |
| + | Locate the following lines: |
| | | |
− | {{underline|'''Openning the Serial Line:'''}} | + | <syntaxhighlight lang="python">NODE_ID = 120 # ID of this node |
| + | BASESTATION_ID = 100 # ID of the node (base station) to be contacted |
| + | </syntaxhighlight> |
| + | |
| + | |
| + | The NODE_ID and BASESTATION_ID are preconfigured and doesn't need to be updated (they can be updated for test purpose). |
| + | |
| + | {{underline|Note:}} the frequency & encryption key are enough to "isolate groups". Nodes ID are used to create mesh network within a group. A simple mesh with 2 nodes: the Receiver base station and the Emitter CanSat. |
| + | |
| + | |
| + | {{underline|'''Opening the Serial Line:'''}} |
| | | |
| As we want to see the received message, we will open a terminal to receives the messages over the USB-Serial line. | | As we want to see the received message, we will open a terminal to receives the messages over the USB-Serial line. |
Ligne 356 : |
Ligne 369 : |
| * mpremote | | * mpremote |
| | | |
− | Just starts the script and wait for the messages to come: | + | Just starts the script it will start to send messages to the base station: |
− | | |
− | [[Fichier:ENG-CANSAT-PICO-RFM69HCW-TEST-20.png|640px]]
| |
| | | |
− | Voilà, We are ready to test the emitter (cansat).
| + | [[Fichier:ENG-CANSAT-PICO-RFM69HCW-TEST-30.png|640px]] |
| | | |
− | {{ambox|text=IF the file {{fname|test_receiver.py}} is copied to the micropython board THEN it can be started from REPL<br />with {{fname|import test_receiver}} }} | + | {{ambox|text=IF the file {{fname|test_emitter.py}} is copied to the micropython board THEN it can be started from REPL<br />with {{fname|import test_emitter}} }} |
| | | |
| == More info == | | == More info == |