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

    [BUG] analogRead(35) beeps

    Scheduled Pinned Locked Moved FAQS
    6 Posts 4 Posters 16.7k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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 Offline
                JJ @dda
                last edited by

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

                1 Reply Last reply Reply Quote 2

                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