Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. DiWa
    3. Posts
    D
    • Continue chat with DiWa
    • Start new chat with DiWa
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by DiWa

    • RE: M5Paper: Recipe display

      Link to hackster.io

      posted in PROJECTS
      D
      DiWa
    • M5Paper: Recipe display

      To ease reading the recipe while cooking, the M5Paper hangs on the cooker hood (my fridge is not magnetic unfortunately) and shows the recipe's details on its ePaper display.

      All recipes are managed in the Recipe Keeper app, and the information about ingredients and preparation is sent via Telegram API to M5Paper.

      More in the video, if you are interested: https://youtu.be/hrmYldbOStQ

      0_1640691376859_IMG_1284 (1).jpeg

      posted in PROJECTS
      D
      DiWa
    • RE: M5Paper Line Break in text

      In case you are interested about the final result: https://youtu.be/hrmYldbOStQ

      posted in General
      D
      DiWa
    • RE: M5Paper Line Break in text

      Solved, this works fine:

      char Rezept[50] = "Line 1 \n Line 2";

      and

      canvas.print(Rezept);

      posted in General
      D
      DiWa
    • M5Paper Line Break in text

      I am trying to display a longer text received from Telegram on the M5Paper display. The text includes \n for line breaks, however I am unable to display it properly. This is the snippit from the Arduino code:

      String Rezept = "Line 1 \n Line 2";

      void setup() {
      Serial.begin(115200);
      M5.begin();
      M5.EPD.SetRotation(90);
      M5.EPD.Clear(true);

      canvas.createCanvas(540, 960);
      canvas.setTextSize(3);
      canvas.setTextArea(0, 0, 760, 390);
      canvas.setTextWrap(true, false);
      canvas.printf(Rezept, 35, 350);
      canvas.printf("Line 1 \n Line 2", 35, 350);
      canvas.drawString("Line 1 \n Line 2", 35, 350);
      canvas.pushCanvas(0,0,UPDATE_MODE_DU4);

      I tried different methods, but none works:
      canvas.printf(Rezept, 35, 350); --> no matching function for call to 'M5EPD_Canvas::println(String&, int, int)'
      canvas.printf("Line 1 \n Line 2", 35, 350); --> This works well, but I hard coded text
      canvas.drawString("Line 1 \n Line 2", 35, 350); --> does not recognize the \n

      Any idea what I can do? Thanks a lot!

      posted in General
      D
      DiWa