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

Flip address is out of range arduino uno r3

Arduino DUE ADC to DAC Piezo 30 Khz-100Khz

Indesign and MathType fonts