arduinoradio-transmission

VirtualWire - Send Integer Array


how can I send and receive array of integers in Arduino using VirtualLibrary. I declared array like this:

int toSend[] = {1,4,5,7,9};

How to correctly send and receive it? Maybe someone can help me?


Solution

  • Just loop over the array toSend and call Serial.write() for each element. Receiving is the reverse (iterate over another array calling Serial.read())