I'm using a tiny 4D Systems OLED screen and I want a drawn box to change size in proportional to a variable.
To draw a box you define it as ($box, $top left X, $top left Y, $bottom right X, $bottom right Y, $colour) all as HEX constants and then send it to the screen via SEROUT.
So how do I get a variable into the string above as a hexadecimal constant?
If I put $ in front of it, it just convert the name of the variable to hex.
The nearest I got was getting it to accept a variable where it expected to see an ASCII constant by putting # in front of the variable.
Thanks.
To draw a box you define it as ($box, $top left X, $top left Y, $bottom right X, $bottom right Y, $colour) all as HEX constants and then send it to the screen via SEROUT.
So how do I get a variable into the string above as a hexadecimal constant?
If I put $ in front of it, it just convert the name of the variable to hex.
The nearest I got was getting it to accept a variable where it expected to see an ASCII constant by putting # in front of the variable.
Thanks.