I want to build a project using the Wemos D1 mini. The board is V3.0.0.
The goal is to send commands using Lora. For this I use the REYAX RYRL890 component.
To test the REYAX system like this: I used two FTDI232 with CoolTerm. Here are the commands:
AT+RESET
AT+IPR=9600
AT+ADDRESS=10 (10 for TX and 11 for RX)
AT+NETWORKID=5
AT+MODE=0
AT+BAND=8680000
AT+PARAMETER=12,7,1,4
Yes, I send AT+SEND=11,4,Hello the reception works perfectly.
But do not work with my Arduino Script!
//TEST WITH WEMOS D1 mini
#include <SoftwareSerial.h> // Librarie série
#define ledPin 2 // LED Pin on the board
SoftwareSerial mySerial(D1, D2); // D1=RX, D2=TX
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // For the serial monitor
mySerial.begin(9600); // For the Wemos port D1=RX D2=TX
while (!mySerial) {
Serial.println("While Serial Loop ");
;
}
Serial.println("Connect! - Conexion ");
delay(50);
Serial.print("AT+RESET\n\r");
delay(50);
Serial.print("AT+IPR=9600\n\r");
delay(50);
Serial.print("AT+ADDRESS=10\n\r");
delay(50);
Serial.print("AT+NETWORKID=5\n\r");
delay(50);
Serial.print("AT+MODE=0\n\r");
delay(50);
Serial.print("AT+BAND=868000000\n\r");
delay(50);
Serial.print("AT+PARAMETER=12,7,1,4\n\r");
delay(50);
}
void loop() {
Serial.print("AT+SEND=11,4,HI\n\r");
digitalWrite(ledPin, HIGH);
delay(1000);
Serial.print("AT+SEND=11,4,LO\n\r");
digitalWrite(ledPin, LOW);
delay(1000);
}
Board Setup:
Board: LOLIN(WEMOS) D1 R2 & mini
Upload Speed : 921600
CUP Frequency: 80 MHz
Hardware connection :
Wemos -> Redax
GND -> GND
3.3V -> VDD
D1 -> TXD
D2 -> RXD
Many thanks in advance for your help
Otto