M5stickC - Display picture on lcd from array - incorrect colors



  • Hi all ,

    I seem to be having dramas displaying pictures on my stickC , Tried the mentioned method in the thread "Lesson 1.2.1" but the image is displayed with lots one horizontal lines and zoomed in "f'ed up" the closest Ive gotten so far is with LCD Image Converter by riuson using Color R5G6B5 , 8bit or 16bit block size , imaged was sized to 80x160 before importing and then i just preview it and copy the code over However the color is incorrect, Green is red , Red is light orange or something i'll try to post some pictures tonight but if anyone has had success any help would be great

    Thanks guys



  • @rotceh_dnih

    I will look into the stick C Image issue as I have a project for the Competition in the works and let you know the results.



  • @rotceh_dnih said in M5stickC - Display picture on lcd from array - incorrect colors:

    Hi all ,

    I seem to be having dramas displaying pictures on my stickC , Tried the mentioned method in the thread "Lesson 1.2.1" but the image is displayed with lots one horizontal lines and zoomed in "f'ed up" the closest Ive gotten so far is with LCD Image Converter by riuson using Color R5G6B5 , 8bit or 16bit block size , imaged was sized to 80x160 before importing and then i just preview it and copy the code over However the color is incorrect, Green is red , Red is light orange or something i'll try to post some pictures tonight but if anyone has had success any help would be great

    Thanks guys

    OK here is what worked for me.

    Download and install G.I.M.P G.I.M.P.org

    create a file 80x160px,
    Add graphics,
    Goto Image>mode>Indexed,
    Make sure ONLY "use web optimised palette" and "Remove unused and duplicate colours from palette".
    Goto File>Export As,
    save the file as .jpg (filename must only have 7 letters),
    Set "Quality" to 90% you may have to reduce this depending on image.
    Click on ALL the boxes to remove the X
    Click on advanced,
    Unselect everything by clicking on the X to remove them,
    Set smoothing to 0,
    Set Subsampling to 4.2.0
    Set DCT to integra and hit save.
    Open UIFlow,
    Click on the manager icon to upload the image to the M5Stick C,
    Drag an image element to the screen and click on it to set the image to the one you uploaded, and then click the > "Play" icon to check the image.



  • Hey Thanks a bunch mate!

    Im using the arduino ide so followed your steps for the image but still had no joy however i did find a way that worked for me

    With my unarguably incredible google-fu i found the M5StickC_Nixie_tube_Clock some Legend made and seen they used M5.Lcd.pushImage VS M5.Lcd.drawBitmap so i followed suit and did the same as before but saved my picture as a jpg via MSPaint then converted via lcd-image-converter and it all worked fine correct colors and all , the only issue i found was if i tried to use pushimage then drawbitmap then pushimage again the image would be corrupt so pushimage all the way it is then.

    TLRD; steal this guys code coz it works great ;) - https://github.com/McOrts/M5StickC_Nixie_tube_Clock



  • Guess i should post my working code to help anyone else

    AirsoftFCU.ino

    /*
      Hector Hind - 10.08.2019
     
      Fire Control Unit "FCU" 
    
      Single,Burst,Full-Auto with single and burst controls via pot on 0
      Mosfet on 36,Trigger on 26, & Mode button = HOME
      
    */
    
    #include <M5StickC.h>
    #include "images.c"
    
    
    //****************************************************************PICTURES**************************************************************************************
    const uint8_t*image1[] = {single,image_data_safe,image_data_hectechfculogo,image_data_burst,image_data_fullauto };
    //**************************************************************************************************************************************************************
    
    
    
    //*****************************************************************GPIO*****************************************************************************************
    const int TriggerPin = 26;     //Trigger switch attached to digital pin 4
    const int MotorPin = 36;      //Motor drive pin (on MOSFET) connected to PWM pin at pin 3
    const int SelectorPin = M5_BUTTON_HOME;  //Selector Pin
    const int timingpot = 0;  //pot
    //**************************************************************************************************************************************************************
    
    
    
    
    //******************************************************************VAR*****************************************************************************************
    int buttonState;            // variable for reading the pin status
    int lastButtonState;           // variable for reading the delayed status
    int FireMode = 0;      //Firing mode of the gearbox.  0 is always safe, 1 is always singleshot
    int TriggerState = 0; // Trigger button state
    const int RunTime = 50;  //Motor run time - THIS CAN AND WILL CHANGE WITH YOUR SETUP, IF YOU SHOT MORE THEN ONCE LOWER IT ,SOMETIMES NOT SHOOTING THEN RASE IT
    
    int potval;
    int potvaltime;
    int potvalshots;
    //int val = 0; //for hall sensor , Thinking about adding a magnet to the gearbox to count each shot or rotation of the gears ect instead of guessing a 50ms on time as this will change with gear ratio,spring size & even battery voltage. 50ms "RunTime" is what works for me now  
    //**************************************************************************************************************************************************************
    
    
    
    void setup()
    {
    
    
      M5.begin();
    
      //!Logo
      M5.Lcd.pushImage(0,0,80,160, (uint16_t *)image1[2]);
    
      delay(5000);
      
     // pinMode(M5_BUTTON_HOME, INPUT);
     // pinMode(BUZZER_PIN, OUTPUT);
      //  SelectorPin = M5_BUTTON_HOME;
      pinMode(timingpot, INPUT);
      pinMode(SelectorPin, INPUT);         // Set the switch pin as input
     // Serial.begin(115200);              // serial for testing - >>>>>>>>>>>>>>>>>> DISABLE ONCE WORKING!!!!!!!!!!!!!!!!!!!!!!!!!<<<<<<<<<<<<<<<<<<<<<<<
      pinMode(MotorPin, OUTPUT);        //Mosfet
      pinMode(TriggerPin, INPUT_PULLUP);      //Trigger
      digitalWrite(MotorPin, LOW);
    }
    
    
    void loop()
    {
    
    
      //val = hallRead();
       // Serial.println(val);//to graph 
        
      potval = analogRead(timingpot);        
      potvaltime = map(potval, 0, 4095, 300, 2300);     
      potvalshots = map(potval, 0, 4095, 1, 22); 
         
      buttonState = digitalRead(SelectorPin);
    
      // compare the buttonState to its previous state
      if (buttonState != lastButtonState) {
        // if the state has changed, increment the counter
        if (buttonState == LOW) {
          // if the current state is LOW then the button went from off to on:
          FireMode++;
          if(FireMode == 4)
          FireMode = 0;
        } else {
          // if the current state is HIGH then the button went from on to off:
          //OFF
        }
        // Delay a little bit to avoid bouncing
        delay(150);
      }
      // save the current state as the last state, for next time through the loop
      lastButtonState = buttonState;
      
    
        // Different fire modes
      if (FireMode == 0)
      { // all-off
    
      M5.Lcd.pushImage(0,0,80,160, (uint16_t *)image1[1]); //safe 
       // M5.Lcd.setTextColor(BLACK, WHITE);
      //  M5.Lcd.setCursor(7, 0, 2);
     // M5.Lcd.print("POT: "); M5.Lcd.print(potval); 
      
        digitalWrite(MotorPin, LOW);
        
      }
    
      else if (FireMode == 1)
      { // Single
        
          M5.Lcd.pushImage(0,0,80,160, (uint16_t *)image1[0]); //single
        
        TriggerState = digitalRead(TriggerPin);
        if (TriggerState == LOW)
        {
          SINGLESHOT();
        }
        else
        {
    
          digitalWrite(MotorPin, LOW);
        }
      }
    
      else if (FireMode == 2)
      { //Burst
        // M5.Lcd.drawBitmap(0, 0, 80, 160,(uint16_t *)image_data_burst);
        M5.Lcd.pushImage(0,0,80,160, (uint16_t *)image1[3]); //Burst
    
        TriggerState = digitalRead(TriggerPin);
        if (TriggerState == LOW)
        {
          BURST(potvalshots);
       //   digitalWrite(13, HIGH);
        }
        else
        {
         // digitalWrite(13, LOW);
          digitalWrite(MotorPin, LOW);
      }
      }
    
      else if (FireMode == 3)
      { //Fullauto
         M5.Lcd.pushImage(0,0,80,160, (uint16_t *)image1[4]); //AUTO
         
        TriggerState = digitalRead(TriggerPin);
        if (TriggerState == LOW)
        {
          digitalWrite(MotorPin, HIGH);  //turn on Motor at MotorSpeed
        }
        else
        {
          digitalWrite(MotorPin, LOW);
        }  
     }
    
     
    }
    
    
    
    void SINGLESHOT()
    {
      digitalWrite(MotorPin, HIGH);
      delay(RunTime);                    //For how long time the motor should run
      digitalWrite(MotorPin, LOW);
      delay(potvaltime); 
     
    }
    
    void BURST(int BurstCount)
    {
    
      for (int j = 0; j < BurstCount; j++)  //run the loop enough times to fire the burst
      {
        digitalWrite(MotorPin, HIGH);  //turn on Motor at MotorSpeed
        delay(RunTime);                    //For how long time the motor should run
      digitalWrite(MotorPin, LOW);
      }
      
      digitalWrite(MotorPin, LOW);
    
    }
    
    
    
    


  • images.c

    
    /*******************************************************************************
    * generated by lcd-image-converter rev.030b30d from 2019-03-17 01:38:34 +0500
    * image
    * filename: unsaved
    * name: single
    *
    * preset name: Color R5G6B5
    * data block size: 8 bit(s), uint8_t
    * RLE compression enabled: no
    * conversion type: Color, not_used not_used
    * split to rows: yes
    * bits per pixel: 16
    *
    * preprocess:
    *  main scan direction: top_to_bottom
    *  line scan direction: forward
    *  inverse: no
    *******************************************************************************/
    
    /*
     typedef struct {
         const uint8_t *data;
         uint16_t width;
         uint16_t height;
         uint8_t dataSize;
         } tImage;
    */
    #include <stdint.h>
    
    static const uint8_t image_data_hectechfculogo[25600] = {
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░▒░░░▒▒░░░░░░░▒░░░▒▒░▒░▒░▒░░░░▒░░░░▒░░▒░▒░░▒░░░░░░░░░░▒░░▒░░▒░░░▒░░░░░▒░░░░░░░░░
        // ░░▒▒░░░▒░░░░░░░░░░░░░░░░░░░▒▒▒░░░░▒▒░▒░░░░░░▒░░░░░░░░░░▒▒░░▒▒░░░▒░░▒░░░░░░░░░░░░
        // ░▒░░▒░░░░▒█████▒░▒▒█████░▒▒░░░▒░░░░░▒░▒███████████████▒░░░▒░░░▒░░▒▒░░░░▒░░░░░░░░
        // ░▒░▒░░▒░░▒▒████░░░░▒████░░░░▒░░░░▒░░░░░░▒█████████████░░░░░░░░░░░░░░░▒░░░░░░░░░░
        // ▒░░▒░▒░░▒░▒▒███░░░▒▒████▒██████░▒████░░▒░░░░▒████░░░██████▒▒████░▒██░▒██░░░░░░░░
        // ░▒░░▒░▒░░░░▒███░░▒░▒████▒██████▒██████▒░░▒░▒▒████░▒▒██████▒██████▒██▒▒██░░░░░░░░
        // ░░░▒░░░░░░░▒███░░░░░▒███░▒█░░░░░░█░▒██░▒░░▒░▒████░░░▒█░░░░░▒█░▒██░▒█░▒██░▒░░░░░░
        // ░░░░░▒▒█████████████████▒█████▒▒██░▒░░░░▒░░░▒████░░▒█████░▒██░░░░▒██████░▒░░░░░░
        // ░░░░░░▒▒████████████████▒████░░▒██▒▒░░░▒░▒▒▒█████▒▒▒████░▒▒██░░░░▒███▒██░▒░░░░░░
        // ░░░░░░░▒░░░▒████████████▒██░░░▒▒██░▒██▒░▒░▒▒████░░░▒██░░░░▒██░▒██▒██░▒██░░░░░░░░
        // ░░░░░░░░░░▒███░░▒██████░▒██████▒██████░░░░▒▒████░▒░▒██████▒██████▒██░▒██░░░░░░░░
        // ░░░░░░░░▒░▒███░░░░▒████░▒██████░▒████░░░░░░▒████░░▒▒██████░▒████░▒██▒▒██░░░░░░░░
        // ░░░░░░░░░░▒██░▒░░░▒████░░░░░░░░░░░░░░░░░▒▒▒▒███░░░▒░░░░░░░░░░░░░░▒░░░░░░░░░░░░░░
        // ░░░░░░░░▒▒▒██░░░░▒▒███▒░░░░▒░▒░░▒░▒░░░▒░░░░▒███░░░░░░░░▒▒░░▒░░░░░░▒░░░░▒░░░░░░░░
        // ░░░░░░░░░░▒██░░░▒▒███░░░▒░▒░░░░░░▒░░▒░░░░▒▒▒██░░░▒▒░▒░░░░░░░▒▒░░░░░░░░▒░░░░░░░░░
        // ░░░░░▒▒░░░▒█░░░▒░▒███░▒░░▒░░░░░░░░░▒░▒░▒░░▒███▒░░░░▒░░░░░░▒░░░░▒░▒░░▒░▒░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒██░░▒░░░░░░░░░░░░░░░░░░░▒█░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒▒██░▒░▒░░░░░░░░░░░░░░░░▒▒░░▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒▒█░░░░▒░░░░░░░░░░░░░░░░░░▒▒░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░▒░▒░▒░░░░░░░░░░░░░░░░░░▒░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒░░░▒░░░░░░░░░░░░░░░░░░▒░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░▒░▒▒░░░░░░░░░░░░░░░░░░▒░▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒▒░░▒░▒░░░░░░░░░░░░░░░░░▒░▒░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒░▒░░░▒░░▒░░▒░▒░▒░░▒░░▒░░▒░░░▒░░░░▒░░░░░░░░▒░░▒░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒░▒▒░░░░░▒░░▒░░▒▒░░░▒░▒░░░░▒░░▒░▒░▒░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒░░▒░░░▒░░▒░░░░░▒░░▒▒░░░░▒▒░░░▒░▒░░░▒░░▒░▒░░░▒▒░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░░░░▒░░░░░░░▒░░░░░░░░░░░░░▒░░░░░░░▒░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒███████████████▒▒███████░▒██▒█████░░▒▒████░░░░▒░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░▒█████████████▒████████████░░████░░░░▒███░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒░▒████░░░░░░░▒██████░░░▒████░░▒███░░░▒▒███░░░▒░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒████░░░░░▒░░▒█████░░░░░▒███░░▒███░░░░▒███░░▒░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒███████████░▒████░░▒░░░▒██▒░░▒███░░░░░▒██░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒█████████░░▒█████░░░▒░▒░▒█░░▒███░░░░▒▒███▒░░▒░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒██████░░░░░▒████░░▒░░▒▒░▒░░░▒███▒░░░▒████░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒█████░░░░░░░▒████░░░▒▒░░░░▒▒░▒███░░░░▒████░░▒░▒░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒████░░░░▒░▒▒▒████▒░░▒░▒░░░░▒█▒████░░▒█████░▒░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒████░░▒░░░░▒▒█████░░░▒░░░░▒██▒███████████▒░░▒░▒░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒████▒░░░▒▒▒░▒▒██████░░▒██████▒██████████░░░░▒░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒███░░▒░░░░░▒░░▒█████████████░▒▒████████░▒░░░░▒░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒██░░░░░░░░░░░░░░▒██████████▒░░░▒████░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒██░▒░░▒░░░░░░░░░░▒███████░░▒▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░▒█▒░░▒░▒░░░░░░░░▒░░░░░▒░░░░▒░▒░░░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░▒▒░░▒░░░░░░░░░░░░░░▒░░▒░░░▒░░░░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░▒░░▒░░░░░░░░░░░░░░░░░░▒░░▒░▒▒░░░▒░░▒░▒▒░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░░▒░▒░▒▒░▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░▒░░▒░░░▒░░░░░▒▒░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░▒░░░░░░░░░▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ▒░░░▒░░▓▓▓▓█▓▒▓▒▓▓▓▒▓▓▓▒░▒▓▓▓░▓▓▓▒▒░▒▒▓▓▓▒▓▓▓░▓▓▓▒█▒░░░▒▓▒▒▒▓░▒▒▓▒▓█▓▒▓▓▓░░░░░░░
        // ░░▒░▒░▒█▓▓██▓▒█▒███▓██▓▒▒▒███▓███▒█▓█▓███▒███▓███▒█▒░▒▒▒█▒█▓█▓█▓█▒███▒█▓▓▒░▒░░▒░
        // ▒▒░▒░░▒░▒▒██▓▒█▒█▓█▓██▓░░▒█▒▒▒█▒█▓███▒▒█▒▒█▓█▓█▒█▓█▒░░░▒█▒█▓███▓█▒░█▒░░░░░▒░▒▒░▒
        // ░▒░░▒░░░░▒█▓▒▒█▒███▒█▓▒▒▒▒█▒▓▒█▓█▓███▒░█▒▒███▒█▓█▓█▓▒░▒▒█▓█▓███▓█▒▒█▒░░░▒░░▒░░░▒
        // ░░▒░▒▒░░░▒█▒░▒█▒█▒█▓███▒░▒▓██▒▓██▒█▒█▒▒█▒▒█▒█▓▓██▒███▒▒▒▓██▒█▒█▓█▒░█▒░▒░░░░░░░▒░
        // ▒▒░░▒░░░▒░▓░░░░░░░▒▒░░░░▒░░░░░░░░░░░▒▒░▒▒░░░▒▒░░░░░░░░░▒░░░░░░▒▒░░▒▒▒░░░▒░░░░░▒░
        // ░░░░░░░░░▒▒░▒░▒░░▒░░░░░░░░░░░░░▒░░▒░░▒░░░▒▒░░░▒░░░░░▒░▒░░░▒░░░░░▒░░░░▒░░░░▒░░░▒▒
        // ░▒░░░░░░▒░░▒░░░░▒░░░▒░░░▒░▒░▒▒░░░░░▒░░░░░░░░▒░░░░▒░░░▒░░░░░▒░░░░░▒░░▒░░░▒░░░▒░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░▒░░▒░░░░░░░░░▒▒░░░░▒░░░░▒░░░▒▒░▒░░▒░░▒░░▒░░▒░░▒░░▒░▒░░░▒░░░░░░░░░░
        // ░░░░░░░░▒░▒░░▒▒░░░▒░▒▒░▒▒▒░░░▒▒░░░▒▒░▒░▒░▒░░░░░▒░░░░░▒░░░▒▒░░▒░░░░░▒▒░▒░░░░░░░░░
        // ░░░░░░░░░▒░░▒░░░░▒░░▒░░░░░▒▒░▒░░░░░░░░░░░░░░░░▒░▒░▒▒▒░░░▒░░░░░▒░░▒▒░░▒░▒░░░░░░░░
        // ░░░░░░░░░░▒░░░░░░░▒░░░░▒▒░░░▒░░▒░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░▒░░░░░░░░░░░
        // ░░░░░░░░░░▒██░░▒█░▒█░▒▒░▒████░░▒▒░░░░▒░░░▒█████░▒██████▒██████░▒████░▒░▒░░░░░░░░
        // ░░░░░░░░░▒▒██░▒██▒██░░░▒██████░░▒░▒░░▒░▒░▒██████▒██████▒██████▒██████░░░░░░░░░░░
        // ░░░░░░░░░░▒▒█░▒██░▒█░░▒░░░░▒██░░░░░░░░░░▒░▒█░▒██░▒█░░░░▒░░▒█░░▒▒█░░██░░░░░░░░░░░
        // ░░░░░░░░▒░▒██░▒██▒██░▒░░▒█████░░▒▒████▒▒░▒█████░▒█████░░▒▒██░░▒██░▒██░▒░░░░░░░░░
        // ░░░░░░░░▒░▒███▒██▒██▒▒░▒█████░░░▒▒████▒░░▒███▒██▒████░░▒░▒██░░▒██████░░░░░░░░░░░
        // ░░░░░░░░░░░▒████░▒██░░░▒██░░░░░▒░░░░░░░░░▒██░▒██▒██░░░░░▒▒██▒░▒███▒██░░░░░░░░░░░
        // ░░░░░░░░▒░▒▒████░▒██▒██▒█████░░░▒░░░░▒░▒▒▒██████▒██████▒░▒██░░▒██░▒██░░░░░░░░░░░
        // ░░░░░░░░░▒░░▒██░░▒██▒██▒██████░░░░░░░░░░░▒█████░▒██████░░▒██░░▒██░▒██░░░░░░░░░░░
        // ░░░░░░░░░░░░▒░░░░▒░░▒░░░░▒░░▒░░░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░▒█▒░░░░░░░░░░▒░░░░░░░░
        // ░░░░░░░░▒░▒▒░░░▒░░░▒░░▒░░░░▒░░░░░░░░░░░░░░░░░▒░▒░░░▒░▒░░░▒░░▒░░░░░▒░░▒░░░░░░░░░░
        // ░░░░░░░░░▒░░▒▒▒░▒░░░░▒░▒░░▒░░▒░░░░▒░░▒░░░░▒░░░░░▒░▒░░░▒░░░▒▒▒░░░▒░▒░░░▒░░░░░░░░░
        // ░░░░░░░░░░░░▒░▒░░░▒░░░▒░░░░░░░░▒░▒░░░░▒░░░▒░░░▒░░░░▒░░▒░▒░░░░░░░░▒░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
        0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 0xc4, 0xe8, 
    /// ect ect to long to post
    };
    
    
    


  • @rotceh_dnih said in M5stickC - Display picture on lcd from array - incorrect colors:

    Hey Thanks a bunch mate!

    Im using the arduino ide so followed your steps for the image but still had no joy however i did find a way that worked for me

    With my unarguably incredible google-fu i found the M5StickC_Nixie_tube_Clock some Legend made and seen they used M5.Lcd.pushImage VS M5.Lcd.drawBitmap so i followed suit and did the same as before but saved my picture as a jpg via MSPaint then converted via lcd-image-converter and it all worked fine correct colors and all , the only issue i found was if i tried to use pushimage then drawbitmap then pushimage again the image would be corrupt so pushimage all the way it is then.

    TLRD; steal this guys code coz it works great ;) - https://github.com/McOrts/M5StickC_Nixie_tube_Clock

    No Joy?
    Thats strange because I actually tested that before posting and had both UIFlow and the M5Stick loaded.
    What exactly didn't work for you?



  • @ajb2k3 Prior i was using M5.Lcd.drawBitmap and after following your suggestion the image was displayed just with the incorrect colors still then after finding the clock code i used M5.Lcd.pushImage and everything displayed correctly.
    i didn't try UIFlow as yesterday was the first time for me hearing about it but i've got it all sorted in arduino land now anyways so happy days indeed :)

    Thanks again mate, truly appreciated!