Sending MQTT data to the LCD
-
Hi,
I'm using the M5 to display temp data from an MQTT server.
All works OK but I'm usingfor (int i = 0; i < length; i++) {
M5.Lcd.setFreeFont(FMB24);
M5.Lcd.print((char)payload[i]);
}To print to the screen, when I print a second value underneath it I had to remove a screen clear command so I could see both values, now the numbers are overwriting each other.
I want to use Drawstring command as this adds a background which I assume will remove the previous numbers but I cannot get it to work with the char based payload, I've tried to convert it but cannot get it working.
Has anyone used Pubsubclient and printed values to the screen using Drawstring?
Cheers,
Phil -
Whether a background color is printed depends on whether you supply one or two color values to
m5.lcd.setTextColor, I think. Are you using M5ez? If so, tryez.print/ez.println? -
Hi,
I'm not using M5ez yet but I will give it a try, I've set the background colour but I don't think it works with M5.Lcd.print commands.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login