🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5 CORE INK

    Scheduled Pinned Locked Moved PROJECTS
    m5 core ink
    2 Posts 2 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      BM22
      last edited by

      Hello Everyone,

      Hope my question is in the right section, if not please let me know, thanks!

      I got a M5 CORE INK and i want connect it with an encoder (360PPR). The goal is to be able to read the value of an angle (in degree)
      Here an example of what i want to do: https://www.youtube.com/watch?v=jN9B3y1iPeA&ab_channel=JpbBricole-
      I'm a real beginer in code, i use Arduino IDE.

      My problem is about how to put the value of the angle on the Core Ink screen's

      Currently, my code work with a visualization on the serial monitorbut i don't know how to push it on the Core Ink screen's

      Here my code:
      '''

      /* Encoder Library - Basic Example

      • http://www.pjrc.com/teensy/td_libs_Encoder.html
      • This example code is in the public domain.
        */

      #include <Encoder.h>

      // Change these two numbers to the pins connected to your encoder.
      // Best Performance: both pins have interrupt capability
      // Good Performance: only the first pin has interrupt capability
      // Low Performance: neither pin has interrupt capability
      Encoder myEnc(25, 26);
      // avoid using pins with LEDs attached
      int newPosition;
      float angle;

      void setup() {
      Serial.begin(9600);
      Serial.println("Basic Encoder Test:");

      }
      long oldPosition = -999;

      void loop() {
      long newPosition = myEnc.read();
      if (newPosition != oldPosition) {
      oldPosition = newPosition;
      angle = newPosition * 0.005;
      Serial.println(angle);
      }

      }
      '''
      I want also put a reset function.

      Thanks

      BM22

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @BM22

        have a look at this example. It shows how to put 'Hello World!' onto the M5CoreInk screen.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0

        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
        • First post
          Last post