🤖Have you ever tried Chat.M5Stack.com before asking??😎
  • Getting started in UIFlow

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Rotary encoder on M5Stack - interrupts?

    rotary encoder interrupt
    4
    0 Votes
    4 Posts
    13k Views
    N
    Hi, sorry about the delay in answering, but I have been really busy with my real life job. The rotary encoder (ALPS STEC12E07) is connected to pins 2 and 3 of the M5Stack and GND. I also have used pins 22 and 23 in the past, but those can crash the app as soon as you are using the TFT of the M5Stack (looked into the header files of M5Stack and found that pin 22 is connected to the TFT). I am using the following code, which you can find in variations on the web: /* Read Quadrature Encoder Connect Encoder to Pins encoder0PinA, encoder0PinB, and +5V. Sketch by max wolf / www.meso.net v. 0.1 - very basic functions - mw 20061220 */ int encoder0PinA = 2; int encoder0PinB = 3; int encoderPos = 0; int lastReportedPos = 0; int aValue = LOW; int bValue = LOW; int aValueLast = LOW; void setup() { pinMode (encoder0PinA, INPUT); pinMode (encoder0PinB, INPUT); digitalWrite(encoder0PinA, LOW); digitalWrite(encoder0PinB, LOW); encoderPos = 2000; Serial.begin (115200); } void loop() { delay(5); aValue = digitalRead(encoder0PinA); bValue = digitalRead(encoder0PinB); if ((aValue != aValueLast) && (aValue == LOW)) { //knob rotated, when aValues changes, BUT use only if aValue is LOW if (bValue == LOW) { encoderPos++; } else { encoderPos--; } } aValueLast = aValue; if(lastReportedPos != encoderPos) { Serial.print("Position: "); Serial.println(encoderPos, DEC); lastReportedPos = encoderPos; } The code works from time to time, but its not reliable on the M5Stack. Tomorrow I will buy another rotary encoder just to exclude any hardware issues. Kind regards Jörg
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • M5Stack and HC-SR04

    6
    0 Votes
    6 Posts
    11k Views
    C
    thanks a lot !!!
  • This topic is deleted!

    2
    0 Votes
    2 Posts
    98 Views
  • New Units and M5 Stick active in UIFLOW!

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Lesson 21. UNITS. EARTH

    1
    0 Votes
    1 Posts
    6k Views
    No one has replied
  • Silly UIFlow Demo

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Introduction M5FIRE & M5GO

    4
    1 Votes
    4 Posts
    13k Views
    F
    @felix42eu OK. Ignore that post. It seems that the "offline" can be ignored. Running the problem works. Still have to figure out how to load and save.
  • Lesson 20. GROVE GPIO + Potentiometr. KingPong Game

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • Lesson 19. LED BAR + MIC. LightMusic

    1
    0 Votes
    1 Posts
    9k Views
    No one has replied
  • Backticks... (Request to admins)

    6
    1 Votes
    6 Posts
    16k Views
    ajb2k3A
    Thank you.
  • Special issue 1. Halloween 2018

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • M5 Creativity 2018

    2
    1
    2 Votes
    2 Posts
    19k Views
    ajb2k3A
    @m5stack @Dimi Can we get this unpinned and deleted now as its so old?
  • Lesson 17. PLC module + relay

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • Coding side of UIflow not loading!

    3
    0 Votes
    3 Posts
    5k Views
    ajb2k3A
    @lukasmaximus 在 Coding side of UIflow not loading! 中说: @ajb2k3 Sorry for the inconvenience. Thanks for pointing it out, we are working on a fix, but in the meantime please use google chrome or firefox to access the website, thanks Have all but IE installed for web design. Firefox is working great today.
  • I2C Scanner working on Cameras Grove Connector.

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • Lesson 14.1. UI Flow. Hello update v. 0.7.0

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • Yes, it was the cable, Thank you everyone.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied