3
Hello,
I’m with a project that uses the Arduino to perform some operations for me.
However, these operations use vectors.
I need to somehow send a computer vector (other than by Serial) to the Arduino, and then send it back to the computer.
Any suggestions on how to do?
Um, let’s see if I can explain myself better. The way I put it was a little weak. I need to send a vector with its respective inputs, and any integer to be used to do some operations with this vector. It’s as if Arduin played a role in a filter for this vector, where it would receive this vector, make some changes to it, and then write a new vector.
It’s just the Arduino, with no extra Shield. A while ago, I did something similar to receive data by RFID. I created a C interface to send the read start authorization by Shield rfid, and then Arduino would print this ID tag rfid in the interface in c.
But in this case it’s only the Arduino. The solution I thought was to write input by vector input:
void setup(){
Serial.begin(9600);
}
byte array[9];
void loop() {
if (Serial.available() >= 9){
for (int i=0; i <=8 ; i++){
array[i] = Serial.read();
}
for (int i=0; i <=8 ; i++){
Serial.println(array[i]);
}
}
}
But would it have a way of sending the whole vector at once? For at some times vectors may have a large number of inputs.