Please can anyone give me some guidance on how to receive serial data from an Arduino UNO USB port into a second Arduino UNO with a USB Host shield fitted ? Example code would be great. I've installed the USB Host Shield 2 library and looked at endless examples but I've completely failed to understand how to achieve this. I think the acm_terminal example should do something like what I need but I've failed to get anywhere with it. Hardware is no problem, I can put together software so long as I have a few examples to work from, and yes I know it would be much easier to use a simple serial connection, see below for the reason I can't.
Background - I have a custom built Arduino UNO based weather station in a sealed box in a pretty innaccessible place that outputs a serial text string every two seconds. It currently feeds into a Raspberry Pi 3, along with six other indoor Arduino based sensors, which processes and publishes the data to an MQTT Broker. I've updated the other sensors to publish their data directly to the MQTT Broker via ethernet and would like to do the same with the weather station. It's not practical to do this with the weather station, hence I'd like to use a second (indoor) Arduino UNO to process and publish the MQTT data. I'd prefer a solution that can be shut off and powered back up without worrying about SD card corruption and other issues with using a Raspberry Pi.
I'm pretty sure what I need is do-able, in fact I'm surprised not to find any examples of doing just this on the web ! I just don't have the software knowledge to achieve it without some help ![]()
PaulM