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