In setup() you are starting the Serial device at 19200. However, you are not doing anything with that device. You need to read the data from the Serial stream and process it or forward it to another stream if required.
For example here is passthrough sketch connecting Serial to SerialUSB:
void setup() {
Serial.begin(57600);
}
void loop() {
if (Serial.available()) {
SerialUSB.write(Serial.read());
}
if (SerialUSB.available()) {
Serial.write(SerialUSB.read());
}
}
Note that on the SodaqOne the_SerialUSB_ is the connection to the host PC / Machine over USB. Serial is available on D12/D13 [edited] and Serial1 connects to the LoRa module.
The goal consists basically within connect a controller (from air cond. trains) to Sodaq ONE board and, then be able to see data via Arduino IDE serial console.
So, as the controller doesn’t have any USB connection chance, it is thought to use a RS232 connector from the controller and plug it into a MAXRS232 converter. So, Sodaq ONE will be connected to the converter via the pins you mention above (D0/D1).
So, in this case, MAXRS232 will be able to convert signals from a TIA-232 (RS-232) serial port to signals suitable for use in TTL-compatible digital logic circuits.
May I be able to develop it properly with the code you posted above as well as the pins (D0/D1)?
Please, correct me anything I missed.
Not worries…Even using D12-TX and D13-Rx it is not sending data yet…
Do you think should come up the controller data into the serial console as we have configured it?
Serial communication can operate with a range of parameters (e.g. number of databits, stopbits etc). The Arduino libraries assume a specific setup by default. I may need to see some documentation on the output of your device to see the format of the data it is sending.
Do you have a second Arduino or Sodaq board? We could try first sending serial data between them to check that it is setup correctly before trying tor read the data stream from your other device.
Hi Gabriel,
Could you please provide me a mail in order to send you our Liebherr Controller Manual (It is in Dutch and just 9 pages). Since I am not able to send pdf files throughout this forum…
May I get a standard script to make a serial communication among those Sodaq boards (Sodaq ONE/NB-IOT), please? So that, in that case, as you said on previous response, we would be able to check first of all if serial data between them is setup correctly.