ürün sipariş numarası 9851219. Sorum şu arduino nano ile e 32 yi bağlayıp mesaj gönderimini test etmek ancak rf setting kısmında no response from module hatası alıyorum.
// ALıcı kodu<br />#include <SoftwareSerial.h><br />#include "LoRa_E32.h"<br /> #define M0 7<br />#define M1 6<br /> struct veriler {<br /> int deger1;<br /> int deger2;<br /> int deger3;<br />} data;<br /> SoftwareSerial loraSerial(10, 11);<br />LoRa_E32 E32(&loraSerial);<br /> void setup() {<br /> pinMode(M0, OUTPUT);<br /> pinMode(M1, OUTPUT);<br /> digitalWrite(M0, LOW); <br /> digitalWrite(M1, LOW); <br /> Serial.begin(9600);<br /> E32.begin();<br /> delay(500);<br />}<br /> void loop() {<br /> while (E32.available() > 1){<br /> ResponseStructContainer rsc = E32.receiveMessage(sizeof(veriler));<br /> struct veriler data = *(veriler*) rsc.data;<br /> Serial.println("Gelen Mesaj: ");<br /> Serial.println(data.deger1);<br /> Serial.println(data.deger2);<br /> Serial.println(data.deger3);<br /> rsc.close();<br /> }<br /> }<br /> //Verici kodu<br />#include <SoftwareSerial.h> <br />#include "LoRa_E32.h" <br /> SoftwareSerial loraSerial(10, 11); <br />LoRa_E32 E32(&loraSerial); <br />#define M0 7<br />#define M1 6<br /> struct veriler{ <br /> int deger1; <br /> int deger2; <br /> int deger3; <br /> } data; <br />void setup() { <br /> pinMode(M0,OUTPUT); <br /> pinMode(M1,OUTPUT); <br /> digitalWrite(M0,LOW); <br /> digitalWrite(M1,LOW); <br /> Serial.begin(9600); <br /> E32.begin(); <br /> delay(500); <br />} <br /> void loop() { <br /> data.deger1=12; <br /> data.deger2=34; <br /> data.deger3=56; <br /> ResponseStatus rs=E32.sendFixedMessage(0,0,23,&data, sizeof(veriler)); <br /> Serial.println(rs.getResponseDescription()); <br /> delay(2000); <br /> }
verici
#include <SoftwareSerial.h>
#include “LoRa_E32.h”
SoftwareSerial loraSerial(10, 11);
LoRa_E32 E32(&loraSerial);
#define M0 7
#define M1 6
struct veriler{
int deger1;
int deger2;
int deger3;
} data;
void setup() {
pinMode(M0,OUTPUT);
pinMode(M1,OUTPUT);
digitalWrite(M0,LOW);
digitalWrite(M1,LOW);
Serial.begin(9600);
E32.begin();
delay(500);
}
void loop() {
data.deger1=12;
data.deger2=34;
data.deger3=56;
ResponseStatus rs=E32.sendFixedMessage(0,0,23,&data, sizeof(veriler));
Serial.println(rs.getResponseDescription());
delay(2000);
}
alıcı
#include <SoftwareSerial.h>
#include “LoRa_E32.h”
#define M0 7
#define M1 6
struct veriler {
int deger1;
int deger2;
int deger3;
} data;
SoftwareSerial loraSerial(10, 11);
LoRa_E32 E32(&loraSerial);
void setup() {
pinMode(M0, OUTPUT);
pinMode(M1, OUTPUT);
digitalWrite(M0, LOW);
digitalWrite(M1, LOW);
Serial.begin(9600);
E32.begin();
delay(500);
}
void loop() {
while (E32.available() > 1){
ResponseStructContainer rsc = E32.receiveMessage(sizeof(veriler));
struct veriler data = *(veriler*) rsc.data;
Serial.println(“Gelen Mesaj: “);
Serial.println(data.deger1);
Serial.println(data.deger2);
Serial.println(data.deger3);
rsc.close();
}
}