HOW TO SEND HEX VALUE FROM PROCESSING TO ARDUINO THROUGH SERIAL


processing code

code: [select]

void setup()
{
  size(200, 200);
  myport = new serial(this, "com6", 57600);
}
 
void draw() {
  fill(value,0,255);
  rect(25, 25, 50, 50);
}
 
void mouseclicked() {
  if (value == 0) {
    value = 255;
    for(int i=0;i<=11;i++){
      myport.write(collect[i]);
    }
  } else {
    value = 0;
  }
}


arduino code

code: [select]

#include <softwareserial.h>
softwareserial myserial(2,3);

void setup(){
 serial.begin(57600);
 myserial.begin(57600);
}
 
void loop(){
 while (serial.available()){
  uint8_t byts=serial.read();
  myserial.write(byts);
 }
}


i got error iyyyy iyyyy iyyyy

even if send single byte 0xef got 'i;'

i checked different baud rates no improvement

for viewing purpose using software serial , 2,3 pins connected cp2102 usb ttl different port(com3).
arduino nano connected com6 upload code. after uploading run processing sketch. because using com6 port.

please find attachment.

quote
how send hex value processing arduino through serial
i have asked stop shouting @ us:

how send hex values processing through serial

you still doing it.

ok. not going use ji word.

but giving respect people. it,
it disrespectful shout @ people. shout @ teachers?

please do not cross-post. wastes time , resources people attempt answer question on multiple threads.

thread locked.

- moderator


Arduino Forum > Using Arduino > Interfacing w/ Software on the Computer > HOW TO SEND HEX VALUE FROM PROCESSING TO ARDUINO THROUGH SERIAL


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor