I understand that Bridge.put(key,value) only support char or string for both key and value.
What is the most efficient way to pass an array to the Linux processor?
key = "someString"
value = array of int [1, 2, 32, 44]
I understand I can convert my array into a string and pass it, but is there a more efficient way that you can think of? Looking for best practices.
I understand I can convert my array into a string and pass it, but is there a more efficient way that you can think of?
Since put() only supports strings, converting your array to a string is the only solution I can think of. Maybe you could take the binary data from the array and use a more efficient encoding scheme like Base64 instead of decimal ASCII?
Just keep in mind that the sketch processor is relatively slow: you don't want to spend more time encoding the data than it takes to send it.
Id use process to call the linux side, inside the process call you can print a line as a string, Id print the array and then in the linux side inside the script Id read and process the array.