M5Unified.h Graphic Colors Don't Match Variables
-
I tried to draw a graph using the M5.Lcd.fillRect() but I can't seem to be able to load the colors into a Variable:
#include <M5Unified.h> void setup() { Serial.begin(115200); auto cfg = M5.config(); cfg.led_brightness = 255; M5.begin(cfg); } void loop() { //White M5.Lcd.fillRect(10, 20, 50, 10, WHITE); uint32_t Color = WHITE; Serial.print("Color WHITE = "); Serial.println(Color); M5.Lcd.fillRect(10, 40, 50, 10, Color); Color = TFT_WHITE; Serial.print("Color TFT_WHITE = "); Serial.println(Color); M5.Lcd.fillRect(10, 60, 50, 10, Color); //Green: M5.Lcd.fillRect(80, 20, 50, 10, GREEN); Color = GREEN; Serial.print("Color GREEN = "); Serial.println(Color); M5.Lcd.fillRect(80, 40, 50, 10, Color); Color = TFT_GREEN; Serial.print("Color TFT_GREEN = "); Serial.println(Color); M5.Lcd.fillRect(80, 60, 50, 10, Color); while (1) ; } https://drive.google.com/file/d/1bo_OfbBQ5SA3hC-_SwRJyUKUOu8QNMk_/view?usp=sharing I'm sure this is an issue with all the other graphical calls, not just the fillRect(). How do I find out what the Color variable is in the fillRect(x,y,z,d,**COLOR**) variable is? Is this a bug? I'm using an M5 Core2 AWS. Sir Michael
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