Ligne 256 : |
Ligne 256 : |
| | align="left" | RST | | | align="left" | RST |
| |} | | |} |
| + | |
| + | === The code === |
| + | Now we will load the '''receiver''' example code from the RadioHead Library. |
| + | |
| + | Load the sketch '''file -> Examples -> RadioHead (or RadioHead-master) -> feather -> RadioHead69_RawDemo_RX''' |
| + | |
| + | {{ambox-stop|text=We will have to modify the code before uploading it to the Arduino Uno!}} |
| + | |
| + | |
| + | {{underline|'''Update for Interface:'''}} |
| + | |
| + | No update are required for the interface as we the following the wiring for ATmega328P: |
| + | |
| + | <syntaxhighlight lang="c">#if defined (__AVR_ATmega328P__) // Feather 328P w/wing |
| + | #define RFM69_INT 3 // |
| + | #define RFM69_CS 4 // |
| + | #define RFM69_RST 2 // "A" |
| + | #define LED 13 |
| + | #endif |
| + | </syntaxhighlight> |
| + | |
| + | {{underline|'''Update for frequency plan:'''}} |
| + | |
| + | The frequency used by the receiver RFM69HCW must be exactly the same as th emitter! z is free for use, please select your own frequency in that range. |
| + | |
| + | Locate the following lignes: |
| + | |
| + | <syntaxhighlight lang="c">// Change to 434.0 or other frequency, must match RX's freq! |
| + | #define RF69_FREQ 915.0 |
| + | </syntaxhighlight> |
| + | |
| + | And update it to: |
| + | |
| + | <syntaxhighlight lang="c">// Change to 434.0 or other frequency, must match RX's freq! |
| + | #define RF69_FREQ 433.0 |
| + | </syntaxhighlight> |
| + | |
| + | {{underline|'''Activate the Serial Line:'''}} |
| + | |
| + | No need to change here as we are using an Arduino UNO. |
| + | |
| + | Voilà, We are ready to compile and upload. |
| + | |
| | | |
| {{ENG-CANSAT-TRAILER}} | | {{ENG-CANSAT-TRAILER}} |