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

    [Solved]M5fire read microphone

    UIFlow
    6
    12
    22.3k
    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.
    • world101W
      world101 @hetzer
      last edited by world101

      @hetzer
      Maybe not with uiFlow yet, but this may help a bit.

      http://forum.m5stack.com/topic/423/m5stack-fire-microphone

      m5-docsM 1 Reply Last reply Reply Quote 0
      • m5-docsM
        m5-docs @world101
        last edited by

        @hetzer @world101 It need to realize it yourself through python code

        0_1555067637519_微信截图_20190412191332.png

        0_1555067647948_微信截图_20190412191202.png

        M5Stack documentation URL

        https://docs.m5stack.com

        1 Reply Last reply Reply Quote 0
        • m5-docsM
          m5-docs
          last edited by

          @hetzer @world101 Here's the arduino code about microphone

          https://github.com/m5stack/M5Stack/blob/master/examples/Fire/M5StackFire_Microphone/M5StackFire_Microphone.ino

          M5Stack documentation URL

          https://docs.m5stack.com

          1 Reply Last reply Reply Quote 0
          • J
            jpilarski
            last edited by

            @watson Just curious why not expose the mic in the hardware blocks. It's already a function of the m5stack micropython api and I think it makes sense to have mic blocks exposed in flow.

            world101W 1 Reply Last reply Reply Quote 0
            • world101W
              world101 @jpilarski
              last edited by

              @jpilarski said in M5fire read microphone:

              It's already a function of the m5stack micropython api

              Is there a microphone specific API (I couldn’t find it), or are you referring to the analogRead API?

              1 Reply Last reply Reply Quote 0
              • J
                jpilarski
                last edited by

                @world101 It is just an adc call with a buffer but it's documented as part of the api. Still wondering why there isn't a block.
                https://m5stack.readthedocs.io/en/master/api-reference/mic/mic.html

                ajb2k3A m5-docsM 2 Replies Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3 @jpilarski
                  last edited by

                  @jpilarski said in M5fire read microphone:

                  @world101 It is just an adc call with a buffer but it's documented as part of the api. Still wondering why there isn't a block.
                  https://m5stack.readthedocs.io/en/master/api-reference/mic/mic.html

                  I have spoke to M5Stack about thinks like this and it is not something they thought of at the time. As the community grows and the hardware spreads it is the users that are discovering the functions needed.
                  BTW you can also make your own blocks but this function is largely undocumented at present.

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  1 Reply Last reply Reply Quote 0
                  • m5-docsM
                    m5-docs @jpilarski
                    last edited by

                    @jpilarski @hetzer @ajb2k3 @world101

                    Why don't we edit mic block? Because it's not all core owns microphone.

                    The core bottom in BASE and GRAY kit does not owns microphone. And M5GO Bottom in Fire, M5GO Kit owns microphone. Hope to get your forgive and understanding.

                    In addition:

                    This documentation will not be updated no longer.
                    https://m5stack.readthedocs.io

                    But the documentation will be updated always. https://docs.m5stack.com/#/

                    M5Stack documentation URL

                    https://docs.m5stack.com

                    1 Reply Last reply Reply Quote 0
                    • J
                      jpilarski
                      last edited by

                      @watson @world101 @ajb2k3 @hetzer
                      I would still consider adding it. I understand it only exists in m5go and fire but then under hardware blocks call the block m5go mic. I just think new users would experiment more with that function exposed as a block. I totally understand I can now make a custom block for this but I still think it makes sense to see it as a default block. It should definitely be exposed for StickC since with that board there is no confusion as they all have a mic. What about having a toggle when the user selects core that designates fire, go, grey, etc. (just like you do with stick and stickC) and have that toggle load the appropriate on board hardware blocks. What about a block that exposes the hall effects sensor too while you are at it. I guess I feel like expose it all since it encourages development and you never know what someone makes with it. At the very least it helps encourage learning and ease of use which seems like the point of block based visual coding.

                      m5-docsM 1 Reply Last reply Reply Quote 2
                      • m5-docsM
                        m5-docs @jpilarski
                        last edited by

                        @jpilarski Thanks a lot! I will tell the engineer about this need

                        M5Stack documentation URL

                        https://docs.m5stack.com

                        1 Reply Last reply Reply Quote 1
                        • I
                          Isabelle
                          last edited by

                          Hello,

                          meanwhile it is possible to use the block "analog read pin (34)" from the blockpack "Easy I/O".
                          So I was able to bild the probram from user M5DOCS just with UIFLOW.

                          Unfortunally it just shows Numbers between 450 and 600 or so. And it dows not react to any sounds.

                          This is the python code of the blockly program:

                          =====
                          from m5stack import *
                          from m5ui import *
                          from uiflow import *
                          from easyIO import *

                          setScreenColor(0x222222)

                          label0 = M5TextBox(122, 84, "Text", lcd.FONT_DejaVu24,0xFFFFFF, rotate=0)

                          while True:
                          label0.setText(str(analogRead(34)))
                          wait_ms(100)
                          wait_ms(2)

                          What did I do wrong?

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