From 6bba404aebff4cadd4e41c89dbf345c83d2c8ab2 Mon Sep 17 00:00:00 2001 From: omahieux Date: Thu, 11 May 2017 19:39:18 +0200 Subject: [PATCH] Mise à jour de LORA_terrestre --- LORA_terrestre.ino | 84 +++++++++++++++++++++++++----------------------------------------------------------- 1 file changed, 25 insertions(+), 59 deletions(-) diff --git a/LORA_terrestre.ino b/LORA_terrestre.ino index 0e2d512..329b9ed 100644 --- a/LORA_terrestre.ino +++ b/LORA_terrestre.ino @@ -1,57 +1,40 @@ -// Feather9x_RX -// -*- mode: C++ -*- -// Example sketch showing how to create a simple messaging client (receiver) -// with the RH_RF95 class. RH_RF95 class does not provide for addressing or -// reliability, so you should only use RH_RF95 if you do not need the higher -// level messaging abilities. -// It is designed to work with the other example Feather9x_TX +/*Programme implanté dans le module FEATHER Adafruit restant au sol*/ #include #include - //for feather m0 + //constantes pour ce module feather #define RFM95_CS 8 #define RFM95_RST 4 #define RFM95_INT 3 //taille des paquets Lora envoyés à chaque émission -#define TAILLE_RADIOPACKET 20 +#define TAILLE_RADIOPACKET 100 -// Change to 434.0 or other frequency, must match RX's freq! +// Définition de la fréquence #define RF95_FREQ 434.0 -// Singleton instance of the radio driver +// Configuration RH_RF95 rf95(RFM95_CS, RFM95_INT); -// Blinky on receipt + #define LED 13 -//Fonction vidage de buffer série +//Fonction vidage du buffer série void serialFlush(){ - pinMode(LED, OUTPUT); + //pinMode(LED, OUTPUT); while(Serial.available() > 0) { char t = Serial.read(); } } -void RAZradiopacket(uint8_t radiopacket[TAILLE_RADIOPACKET]){ - int j; - for(j=0;j