Text formatting, console and by text on the screen
in
Programming Questions
•
3 years ago
Hi,
Been trying to figure out why my teext formatting isnt predicatable. Help.
I fill the strarray with data from a serial port. That seems to happen but this is the way it gets formatted on the console area.
Receiving :-
#00 0
#00 0
#00 0,
#00 0,
#00 0,
#00 0
#00 0,
#00 0,
#00 0
What I want is
Receiving :- #00 0
#00 0, #00 0, #00 0, #00 0
Second using the text command I want to print "A Test" to the screen. But it flickers briefly on the screen then dissappears.
void serialEvent(Serial myPort)
{
String input = myPort.readStringUntil(0x0D);
{
String input = myPort.readStringUntil(0x0D);
if((input != null))
{
println("Receiving :-" + input);
strarray[pointer] = input;
pointer++;
if (pointer == 4)
{
pointer = 0;
}
myPort.clear();
}
else
{
String joined = join(strarray, ", ");
println(trim(joined));
}
text("A Test", 20, 200, 150, 30);
}
{
println("Receiving :-" + input);
strarray[pointer] = input;
pointer++;
if (pointer == 4)
{
pointer = 0;
}
myPort.clear();
}
else
{
String joined = join(strarray, ", ");
println(trim(joined));
}
text("A Test", 20, 200, 150, 30);
}
Any clues?
Thanks
Stefan
1