Problem with serial communication!


hi guys!!
i' ve problem serial communication arduino processing, explain: if want send int arduinio processing have no problem, if load vector random number , want send them processing, processing doesn' t show me values. try load vector , print on serial monitor of arduino, in case there problem, monitror doesn' t show me values. why???
arduino code:

int v[1024];
void setup()
{ serial.begin(9600);
  //serial.flush();
}

void loop()
{
 for(int i=0;i<1024;i++)
 {
   v=random(100);
    serial.write(v);
 }
}

processing code:
mport processing.serial.*;
serial myport;
int val;    

void setup()
{
 string portname = serial.list()[1];
 myport = new serial(this, portname, 9600);
 println(portname);
}

void loop()
{
 while ( myport.available() > 0)
 { val = myport.read();  
   println(val);
 }

}

thanks answers!!

which processor using?
that 1024 int vector looks suspisious


Arduino Forum > Forum 2005-2010 (read only) > Software > Interfacing > Problem with serial communication!


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums