capric
March 1, 2024, 7:24am
1
Bonjour,
Je souhaite créer un système de communication entre deux Arduinos en utilisant le module Lora sx1278 mais malheureusement dés que je démarre l'Arduino transmetteur il me renvoi directement "LoRa Sender
Starting LoRa failed! "
Mes branchements sont les suivants :
lora ---> arduino
3,3v 3,3v
gnd gnd
dio0 d2
rst d9
nss d10
mosi d11
miso d12
sck d13
Et voici mon code pour l'Arduino transmetteur :
#include <SPI.h>
#include <LoRa.h>
#define ss 10
#define rst 9
#define dio0 2
int counter = 0;
void setup() {
Serial.begin(9600);
while (!Serial);
LoRa.setPins(ss, rst, dio0);
Serial.println("LoRa Sender");
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
delay(100);
while (1);
}
LoRa.setTxPower(20);
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// send packet
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
Merci pour votre réponse.
srnet
March 1, 2024, 7:25am
2
Can you post in english please ?
capric
March 1, 2024, 7:30am
3
Good morning,
I want to create a communication system between two Arduinos using the Lora sx1278 module but unfortunately as soon as I start the Arduino transmitter it sends me directly "LoRa Sender
Starting LoRa failed! "
My connections are as follows:
lora ---> arduino
3.3v 3.3v
gnd gnd
dio0 d2
rst d9
nss d10
mosi d11
miso d12
sck d13
And here is my code for the Arduino transmitter:
#include <SPI.h>
#include <LoRa.h>
#define ss 10
#define rst 9
#define dio0 2
int counter = 0;
void setup() {
Serial.begin(9600);
while (!Serial);
LoRa.setPins(ss, rst, dio0);
Serial.println("LoRa Sender");
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
delay(100);
while(1);
}
LoRa.setTxPower(20);
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// send packet
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
Thank you for your reply.
srnet
March 1, 2024, 7:34am
4
Which Arduino are you using ?
capric
March 1, 2024, 7:47am
5
excuse me for disturbing you I just changed the sx1278 module to see if it was a hardware problem and it was indeed the case
srnet
March 1, 2024, 7:52am
6
Good.
But which Arduino were you using ?
system
Closed
August 28, 2024, 7:53am
7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.