Hi Blynkers!
-
Can anyone assist me to solve my issue? I make project for measuring temperature and
humidity use:
DHT11 +ESP32+LoRa RF95 as transmitter --------LoRa as receiver+ESP32 ===>show on Blynk app -
My problem is I can’t connect from in the receiver side to blynk. So far, the result in serial print shows
[1082641] Login timeout
[1084641] Connecting to blynk-cloud.com:80
Did I do mistake? I hope anyone can help me
- Below my sketch in the receiver side
/// Set Pin
// ESP 32 SX95_Lora
/// GND----------GND (ground in)
/// 3V3----------3.3V (3.3V in)
/// interrupt 0 pin D2-----------DIO0 (interrupt request out)
/// SS pin D5----------NSS (CS chip select in)
/// SCK pin D18----------SCK (SPI clock in)
/// MOSI pin D23----------MOSI (SPI Data in)
/// MISO pin D19----------MISO (SPI Data out)
/// RST pin D14-----------RST
///==================================================
#include <SPI.h>
#include <LoRa.h>
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = “XXXX”;
char ssid[] = “XXXX”;
char pass[] = “XXXX”;
//define the pins used by the transceiver module
#define ss 5 //nss
#define rst 14
#define dio0 2
float temperature, humidity;
void setup() {
//initialize Serial Monitor
Serial.begin(9600);
while (!Serial);
Serial.println(“LoRa Receiver”);
//setup LoRa transceiver module
LoRa.setPins(ss, rst, dio0);
while (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
delay(500);
}
//LoRa.setSyncWord(0xF3);
Serial.println("LoRa Initializing OK!");
delay(1000);
Blynk.begin(auth, ssid, pass);
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize) {
// received a packet
Serial.print(“Received packet '”);
// read packet
while (LoRa.available()) {
temperature = LoRa.read();
humidity = LoRa.read();
//String LoRaData = LoRa.readString();//To read the incoming data you use the readString() method
//Serial.print(LoRaData);
//The incoming data is saved on the LoRaData variable and printed in the Serial Monitor.
}
Serial.println(temperature);
Serial.println(humidity);
// print RSSI and SNR of packet
Serial.print("SNR= "); //As higher the number, better the signal (higher than 7 is perfect)
Serial.print (LoRa.packetSnr());
Serial.print(" RSSI= "); //As higher the number, better the signal (0 = Very good signal and -80 = not so good)
Serial.println(LoRa.packetRssi()); //Serial.println(LoRa.packetRssi()); //the next two lines of code print the RSSI of the received packet in dB
}
sendtoblynk();
}
void sendtoblynk(){
Blynk.virtualWrite(V0, temperature);
Blynk.virtualWrite(V1, humidity);
}
Thank You Very Much