Hi,
I am having this problem whit my device/code. since I updated the NINA firmware. The serial monitor gets periodically blocked because of a busy serial port.
Is it possible there is a bug in the code of the "arduinomodbus" library? And how can I fix it?
does
screenshot1
screenshot2
|Type:|Arduino MKR WiFi 1010|
|FQBN:|arduino:samd:mkrwifi1010|
|Serial Number:|Unavailable|
|NINA Firmware:|1.4.5|
I use a MKR 485 shield in combination with the mkr wifi 1010
Small Code
*/
#include "thingProperties.h"
#include <ArduinoModbus.h>
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
Serial.println("Modbus RTU Client");
// start the Modbus RTU client
if (!ModbusRTUClient.begin(9600)) {
while (1);
}
}
void loop() {
ArduinoCloud.update();
// Your code here
}