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

    [BUG] analogRead(35) beeps

    FAQS
    4
    6
    14.2k
    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.
    • dasloloD
      daslolo
      last edited by

      That's uncommon.
      Try this out:

      #include <M5Stack.h>

      void setup() {
      M5.begin();
      }

      void loop() {
      float v = analogRead(35);
      }

      1 Reply Last reply Reply Quote 0
      • dasloloD
        daslolo
        last edited by daslolo

        So the DSOs have voltage dividers not voltage regulators?
        Good to know about noise causing spikes like that. I read that 3.3V on the EPS input is the maximum and more could damage the chip, ouch. How do I know if I damaged my esp32?

        @calin 在 M5Stack 2 Channel Oscilloscope 中说:

        Some basic filters and voltage dividers at the input pin, can solve that problem.

        I'm familiar with voltage divider but what are examples of basic filters?

        1 Reply Last reply Reply Quote 0
        • C
          Calin
          last edited by

          add dacWrite(25,0); after M5.begin(); and the noise will be gone.

          dasloloD 1 Reply Last reply Reply Quote 2
          • dasloloD
            daslolo @Calin
            last edited by

            @calin thank you, this did it.
            Could you explain what was happening and why dacWrite(25,0) is working?

            D 1 Reply Last reply Reply Quote 0
            • D
              dda @daslolo
              last edited by

              @daslolo #define SPEAKER_PIN 25 --> src/utility/Config.h

              void SPEAKER::mute() {
                ledcWriteTone(TONE_PIN_CHANNEL, 0);
                digitalWrite(SPEAKER_PIN, 0);
              }
              

              --> src/utility/Speaker.cpp

              Basically, it's telling the M5 speaker to shut up.

              JJJ 1 Reply Last reply Reply Quote 0
              • JJJ
                JJ @dda
                last edited by

                @dda So it is the "shut up"function ! ha ha

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post