Hello,
I have one Arduino Uno and one Arduino Mega both plugged into different computers.
I tried to use different wirings and example codes but let me give you an example. I used this scheme for wiring.
(In guide, resistors and voltage dividers are used but I couldn't use them because I dont have those. However, I read that TTL-100 is 5V tolerant)
- E32-TTL-100----- Arduino UNO
- M0 ----- GND
- M1 ----- GND
- RX ----- PIN 2
- TX ----- PIN 3
- AUX ----- Not connected
- VCC ----- 3.3v/5v
- GND ----- GND
I used the example code (with library) in this guide:
which is :
#include "Arduino.h"
#include "LoRa_E32.h"
LoRa_E32 e32ttl100(2, 3); // RX, TX
void setup() {
Serial.begin(9600);
delay(500);
Serial.println("Hi, I'm going to send message!");
// Startup all pins and UART
e32ttl100.begin();
// Send message
ResponseStatus rs = e32ttl100.sendMessage("Hello, world?");
// Check If there is some problem of succesfully send
Serial.println(rs.getResponseDescription());
}
void loop() {
// If something available
if (e32ttl100.available()>1) {
// read the String message
ResponseContainer rc = e32ttl100.receiveMessage();
// Is something goes wrong print error
if (rc.status.code!=1){
rc.status.getResponseDescription();
}else{
// Print the data received
Serial.println(rc.data);
}
}
if (Serial.available()) {
String input = Serial. readString();
e32ttl100.sendMessage(input);
}
}
BTW, it says gonna send message and success!!
However, I could not communicate between those two boards. I didn't play with frequency settings.
Does anyone know what could have gone wrong?
Please help I purchased two of these modules and their use is crucial for my project