Where is `rgbled` function in code?
-
Where is
rgbleddefined in the source code?I would like to read a little of how the function works behind the scenes.
-
You can find it here: https://github.com/pycom/pycom-micropython-sigfox/blob/Dev/esp32/mods/modpycom.c#L159
All source code for the modules you can import can be found in the
modsfolder.Best,
Gijs -
@Matthew-Felgate In addition to the place @Gijs mentioned in the files
modled.candmodled.hin themodsfolder. -
Could you edit it so that you could do things like
rgbled('red'),rgbled('blue'),rgbled('yellow')etc?You could allow webcolors and just translate to hexcodes behind the scenes.
-
@Matthew-Felgate The question then would be, which web colour set to use. Thus I consider it sufficient as it is. You can always make s little Python module wich defines the color names and reuse that, e.g.
WHITE = const(0xffffff) RED = const(0xff0000) # and so on
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