I feel like I'm doing something horribly wrong but I can't find much documentation about software serial. Is there a way I can fix this? I'm just trying to send the number 10. Later I plan to send a pretty large int array.
Can someone help me get software serial working so I can continue with my project?
Okay, so if I did theoretically get this working, I need to send data packets back and forth between two devices. Assume that device 1 is an Arduino Nano, and device 2 is an Arduino Micro (my current test setup, the Nano will be replaced with a WeMos D1 Mini in the final version).
Device 1 needs to send a data packet (probably an array) of ints containing various values. Device 2 needs to receive the data packet, and then send it's own data back.
This will repeat multiple times per second over the soft serial connection.
How would I structure the packets, clear the buffer, etc?
EDIT - If my requests are impossible to fulfill with serial I am looking into I2C.
Maybe start by telling us what you want to send from 1 to 2 and what from 2 to 1. Sending as text would be the easiest (see Robin's updated serial input basics on this forum to get ideas); sending in binary format is a little more complicated as you need to make sure that you know where packets start and end.
I then need to send an identical array from the Nano to the Micro. This should start upon startup of both Arduinos (they will start at the same time) and continue until both are turned off.