I need help (receive HEX from PC to arduino)


hardware : arduino micro

hardware circuit:


code:

#include<softwareserial.h>
softwareserial myserial(11,12);  //rx .tx
byte transitvalue = 0x00;

void setup() {
serial.begin(9600);
myserial.begin(9600);

}

void loop() {
 if(myserial.available())
 {
   transitvalue =myserial.read();
 }
serial.println((byte)transitvalue,hex);
serial.println((byte)transitvalue,bin);
delay(1000);

}

question send (hex)1b pc serial tool , arduino receive (hex)72 ?
i try serial1 receive hex pc, result same. send (hex)1b, arduino receive (hex)72.





can't see schematic, , you're lacking detail in description, i'm going guess you're missing inversion.


Arduino Forum > Using Arduino > Programming Questions > I need help (receive HEX from PC to arduino)


arduino

Comments

Popular posts from this blog

Help with codes to add 1 more shift register and add more to matrix LED

tcp client

Is there an HTML component in Flex 2.0?