Hi all,
i´ve searched here to find something which lets me "pull-out" individual ascii-bytes out of a text.
like: serial.print ("hello world");
does it.
But i need to do it manually. I have an old printer which need hadshakening for every letter.
Therefore i need to convert every letter into a single byte and store it temporarily in a variable print it out add the handshake and go on to the next letter.
I´m not very familiar with these char, ascii and string things, i also looked here:
especially the string.getBytes(buf, len) - but that´s not what i need and also may to complex for my rather little problem....
like this:
pseudo code:
pointer = 0;
byte = 0;
array string = "hello word.";
run until "." detected
{
pointer at string and read letter;
convert it into hex ascii and store in byte;
handshake; // i know how to do this;)
myPrintRoutine (byte); // i done this with hardcoded "t" by sending 0x74 works fine, but that´s boring;)
handshake; // simply wait until printer is ready again by testing a pin..
pionter++;
}
/pseudo code
Any help on how to get these ascii bytes out of a given "text" one by one would be nice.
thanx,
Tubical