Hi everyone,
i have an a string i want to like on this sample whatever i tried i cant get it done please someone can help me?
String Numbers="123456"
i want to convert it like this
byte n1=0x01
byte n2=0x02
byte n3=0x03
byte n4=0x04
byte n5=0x05
byte n6=0x06
or like this also help me
byte numArray[]={0x01,0x02,0x03,0x04,0x05,0x06};
whatever i tried i cant get it like this
Because i want to write this string to serial like this
Serial.write(0x01);
Serial.write(0x02);
Serial.write(0x03);
Serial.write(0x04);
Serial.write(0x05);
Serial.write(0x06);
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.