I'm currently building something with an arduino and pd. Arduino vets- help is appreciated!
So, I'm using [comport] and [convert.ascii2pd] to read inputs from an arduino. I'm not using pduino, firmata, etc. because I'm multiplexing the input.
I have a multiplexer read 8 potentiometers going into 1 analog input on my arduino. So I rapidly read all 8 of the inputs in a loop and print them out over serial.
My problem is I don't know how to take this stream and put it to an array properly. Out of [comport] to [convert.ascii2pd] to printing the results looks like this:
print: 790
print: CR
print: LF
print: 0
print: CR
print: LF
print: 0
print: CR
print: LF
print: 0
print: CR
print: LF
print: 703
print: CR
print: LF
print: 649
print: CR
print: LF
print: 547
print: CR
print: LF
END: bang
I'm seperating the values with special characters, which can be weeded out with [route] if need be. I have the end of each 8 input read banging.
But it's late and my head is reeling. Not sure where to start next in terms of putting these properly in a list or an array. The end goal being that I have 8 potentiometers that can control things in pure data. Any way to make sense of this input?
The things we do for more inputs!