Modifications

Sauter à la navigation Sauter à la recherche
487 octets ajoutés ,  12 octobre 2018 à 17:26
Ligne 75 : Ligne 75 :  
{{underline|Tuned frequency:}}
 
{{underline|Tuned frequency:}}
 
The tuned frequency is declared with a line like this:
 
The tuned frequency is declared with a line like this:
  if (!rf69.setFrequency(RF69_FREQ)) {
+
<syntaxhighlight lang="c">  if (!rf69.setFrequency(RF69_FREQ)) {
 
     Serial.println("setFrequency failed");
 
     Serial.println("setFrequency failed");
}
+
}</syntaxhighlight>
    
where the tuned frequency is declared with the constant '''RF69_FREQ'''.
 
where the tuned frequency is declared with the constant '''RF69_FREQ'''.
   −
#define RF69_FREQ 433.0
+
<syntaxhighlight lang="c">#define RF69_FREQ 433.0</syntaxhighlight>
 +
 
 +
== Encyption Key ==
 +
The module encrypts the data with AES-128.
 +
 
 +
The encryption key is defined into the following lines.
 +
 
 +
<syntaxhighlight lang="c">  // The encryption key has to be the same as the one in the server
 +
  uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
 +
                    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
 +
rf69.setEncryptionKey(key);</syntaxhighlight>
    
== The Emitter ==
 
== The Emitter ==
30 894

modifications

Menu de navigation