Hi,
(I have basic knowledge about the topics in this post, so it could be that I use incorrect terminology here and there. Nevertheless I hope it is clear with a bit of out-of-the-box imagination )
We want to connect a sensor to the UART on the Sodaq One v3 and have the latter read/write data from the sensor using RS232. We bought a RS232 Shield from Seeed and connected it to the Sodaq One:
- Tx (shield) is on D13 (Sodaq)
- Rx (shield) is on D12 (Sodaq)
According to a short explanation about serial communication on your website we have the following (slimmed down) code:
void setup()
{
Wire.begin(); // Start the I2C protocol (also needed for the display)
SetupBOD33();
SerialUSB.begin(115200);
SerialUSB.setTimeout(500);
Serial.begin(115200);
}
void loop()
{
if (Serial.available() > 0) { //Check if data is available (non-blocking)
int incomingData = 0;
incomingData = Serial.read(); //Read incoming data
Serial.println("Echo: " + (char)incomingData); //As test: echo data to the same serial port
}
Serial.write("Test123");
}
Everything builds (board files version 1.6.18), but we do not receive any data. To verify if there is a signal, we used a oscilloscope and measured no signals coming from the pin D12, so it seems like we are missing some important steps.
Can you assist us in how we should be able to send/receive to/from the Sodaq One?