Hi,
I'm working on my first Arduino project using LoraWAN8688 ASR6501 M5 module. I would like left nano to send message, and right nano to receive and read it.
I think however, that my Lora module must be configured before it will send and receive data from Arduino. I don't know even how to send it it
How can I send AT+ commands to the LORA module to configure it? Do I need any additional cables or connectors, or can I use Arduino to set it up?
Can I use Serial.println("AT+ADDRESS=1"); to set address via andruino?
RECEIVER CODE:
String incomingString;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("AT+ADDRESS=3");
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()){
incomingString = Serial.readString();
if (incomingString.indexOf("TeamA") >0){
delay(500);
}
}
}
TRANSMITTER CODE:
unsigned long lastTransmission;
const int interval = 1000;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("AT+ADDRESS=2");
}
void loop()
{
if (millis() > lastTransmission + interval) {
Serial.println("AT+SEND=1,6,TeamA");
delay(2000);
lastTransmission = millis();
}
}