Introduction
In this post it is showed how to test the RS-232 M-Duino PLUS version.
Requirements
Ethernet PLC: Ethernet PLC
RS-232 Library : Industrial Shields RS-232 Library (Github)
Software
Connecting an M-Duino with other equipment through RS-232.
On the Sketch is showed that you must send a 0xA5 thought RS-232 to complete this test.
RS-232 Test sketch:
///////////////////////////////////////////////////////////////////////////// void setup() { Serial.begin(9600L); Serial.println("mduino-plus test RS-232 started"); Serial2.begin(9600L); } ///////////////////////////////////////////////////////////////////////////// void loop() { while (Serial2.available()) { Serial2.read(); } Serial2.write(0xa5); delay(50); if (Serial2.read() == 0xa5) { Serial.println("RS232 (Serial2) OK"); } else { Serial.println("RS232 (Serial2) FAIL"); } delay(1000); }