Sending Vectors from Computer to Arduino

3

Hello,

I have a project that uses Arduino to perform some operations for me.

However, these operations use vectors.

I need some way to send a computer vector (other than Serial) to the Arduino, and then send it back to the computer.

Any suggestions how to do it?

Hm, 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 entries, and any integer to be used to do some operations with this vector. It is as if the arduino played a role of a filter for this vector, where it would receive this vector, make some changes in it, and then write a new vector.

It's just the Arduino, with no extra shields. Some time ago, I did something similar to do RFID data reception. I created an interface in C to send the permission to start reading through the rfid shield, and then the arduino printed this rfid tag ID on the interface in c.

But in this case it's just 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 you have a way to send the whole vector at once? For at times the vectors may have a large number of inputs.

    
asked by anonymous 11.11.2015 / 22:35

0 answers