Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    pycom.heartbeat

    Scheduled Pinned Locked Moved Issues & Bugs
    pycom
    8 Posts 2 Posters 4.3k 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.
    • L Offline
      Lokefar
      last edited by

      Unsure if it is a bug or a choice but as fare as I can see it is only possible to use the heartbeat function with the color blue?
      I could see applications where it would be nice to be able to change the heartbeat color.

      L 1 Reply Last reply Reply Quote -1
      • L Offline
        livius @Lokefar
        last edited by livius

        @Lokefar
        look here
        https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/led.html?highlight=rgb

        this line
        disable default firmware programmed blinking

        pycom.heartbeat(False)
        

        think about people first, then computers

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lokefar
          last edited by

          @livius I am not sure I understand your answer? I know it is possible to change the color of the LED with the

          pycom.rgbled('color')
          

          command, but as you can see in the traffic light example that is with

          pycom.heartbeat(False)
          

          My question/comment was that the heartbeat don't seem to work with other colors than blue.

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            livius @Lokefar
            last edited by livius

            @Lokefar said in pycom.heartbeat:

            pycom.heartbeat(False)

            it work for me

            pycom.rgbled(0x007f00) # green
            

            i have many state indicator in rgb led color like pink, orange ..
            And it work for me - do you heve latest firmware?

            did you do first disabling firmware blinking as mentioned in the first post?
            pycom.heartbeat(False)

            think about people first, then computers

            L 1 Reply Last reply Reply Quote 0
            • L Offline
              Lokefar @livius
              last edited by

              @livius Just ran this code via the REPL:

              >>> pycom.heartbeat(True)
              >>> pycom.rgbled(0x007f00)
              Traceback (most recent call last):
                File "<stdin>", line 1, in <module>
              OSError: the requested operation is not possible
              

              As fare as I can see I have the latest firmware version.

              L 1 Reply Last reply Reply Quote 0
              • L Offline
                livius @Lokefar
                last edited by livius

                @Lokefar

                pycom.heartbeat(True)
                

                turn on fimware blinking - do not use it if you do not need default firmware state indicator only own one

                on start do

                pycom.heartbeat(False)
                

                and after this you can turn color by typing

                pycom.rgbled(0x007f00)
                

                think about people first, then computers

                L 1 Reply Last reply Reply Quote 0
                • L Offline
                  Lokefar @livius
                  last edited by livius

                  @livius I get that. I can turn the light on with a color without problem. My suggestion was that it was made possible to change the color of the heartbeat function (ie. the blinking light/firmware blinking). That way I wouldn't have to write a function for blinking lights but could use the one already in the firmware.

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    livius @Lokefar
                    last edited by livius

                    @Lokefar

                    firmware blinking blue indicate that all is ok
                    firmware state red indicate problem..
                    than changing "defaults" firmware colors are not avaiable

                    think about people first, then computers

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

                    Pycom on Twitter

                    Pycom