Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. kosternet
    K
    • Continue chat with kosternet
    • Start new chat with kosternet
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    kosternet

    @kosternet

    1
    Reputation
    3
    Posts
    600
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online

    kosternet Follow

    Posts made by kosternet

    • RE: How to display picture

      @powersoft Maybe you find it interesting to know that there is a way of compiling a picture into your code so that you do not need an SD-card. This could make your solution more simple.

      To do:

      Download the UTFT-library from Rinky Dink Electronics (http://www.rinkydinkelectronics.com/library.php?id=51)
      Extract the download and use the Tools\Imageconverter565.exe to convert the image to a .c file (select AVR board)
      Open the .c file and change the line '#include <avr/pgmspace.h>' into '#include<pgmspace.h>'
      Insert the following lines in the file (the values should be the same as the image, 320x240 is max for M5Stack):
      const uint16_t imageWidth = 320;
      const uint16_t imageHeight = 240;
      Rename the .c file into .h (e.g. logo.c into logo.h) and place the file in the folder where the .ino-file for your project is
      In your Arduino-program add the following line in the top (or the other filename you have chosen)
      #include <M5Stack.h>
      #include "logo.h"
      In your Arduino-program add the following line in the 'setup'-function:
      M5.Lcd.setSwapBytes(true);
      In your Arduino-program add the following line in the place where you want to show the image:
      M5.Lcd.pushImage(0, 0, logoWidth, logoHeight, logo);

      I have included a link to a small demo-file on the following page:
      https://info.kosternet.nl/doku.php?id=publiek:m5stack

      posted in Arduino
      K
      kosternet
    • RE: ATOM Matrix leds blink very shortly at random (solved by workaround)

      Hi @robalstona , @lukasmaximus and @hague ,

      First of all, thanks for your very quick response! I found out what seems to be the problem;

      I was using the M5Atom.h to control the leds, and somewhere in the M5.Update() the flickering sometimes occurred. The problem was indeed solved using the fastled library. The device works exactly as I was hoping now.

      For this I needed to remove M5Atom.h, because indeed some functions and variables overlap.

      Thanks again for pointing me in the right direction.

      Greetings from a very happy Geert :-)

      posted in Arduino
      K
      kosternet
    • ATOM Matrix leds blink very shortly at random (solved by workaround)

      Hi there everone,

      I have a ATOM matrix. I program it using the Arduino IDE.

      I created a program that makes a webserver out of the ATOM. This all works fine.
      When I call a special URL the screen changes to a color with the following code:

      void showGreen(){
      M5.dis.clear();
      for(int i=0;i<=24;i++){
      M5.dis.drawpix(i, 0xff0000);
      }
      color="Green";
      }

      However, when I run the program, the screen is indeed changed to green, BUT the screen keeps flashing every second or so where the color changes for just a split-second and then changes to the correct color.

      Anyone has any idea what can be causing this?

      Hope to hear from you soon,
      Geert

      posted in Arduino
      K
      kosternet