pycom.heartbeat
-
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. -
@Lokefar
look here
https://docs.pycom.io/pycom_esp32/pycom_esp32/tutorial/includes/led.html?highlight=rgbthis line
disable default firmware programmed blinkingpycom.heartbeat(False) -
@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.
-
@Lokefar said in pycom.heartbeat:
pycom.heartbeat(False)
it work for me
pycom.rgbled(0x007f00) # greeni 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) -
@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 possibleAs fare as I can see I have the latest firmware version.
-
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) -
@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.
-
firmware blinking blue indicate that all is ok
firmware state red indicate problem..
than changing "defaults" firmware colors are not avaiable
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