Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved WS2812B support, fixed library import from 2 different trees, added demo to control neopixels with on/off and brightness control from tux touch pads #32
base: master
Are you sure you want to change the base?
Improved WS2812B support, fixed library import from 2 different trees, added demo to control neopixels with on/off and brightness control from tux touch pads #32
Changes from 3 commits
b9f4315
62406a9
6dfaa53
495f3ee
c148a9d
8b8787e
c7ccdc0
cd17efa
1956377
4fc9f46
3dbc34d
528bfa1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda fascinated…
aiko.led
is imported and initialised bymain.py
, so we could kinda eliminate those lines; what do we get from the switch fromaiko.led.pixel
toled.pixel
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes and no, I ran this code from repl where it was not visible. There are some weird visibility issues between what's visible from repl and from code run by main.py.
I've had a lot of issues with led.dim being a different value when set from MQTT, or from code. I'm still trying to figure out why, it's very perplexing.
If you are experienced with micropython namespace issues, let me know and I'll share more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely clear on it either, it strikes me. I'd swear
aiko
is always imported on my REPL. Perhaps that's more to do the with limits of the soft reset inflicted by Control-D, though. (I've also noticed poor or zero reliability of MQTT hook-up after ^D, which I need to nut out.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, clear now: we've got the double import problem (see PR-level convo here) and when
main.py
runs it's doing so with the same globals as the REPL. So, straight after booting you can seeaiko
,application
,common
,configuration
,plugins
, and a bunch of others even though you didn't import them. ^D kicks it all off again.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiko.led.length
works… sure, it's not at all encapsulated, but bytes are scarce, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this was also to try namespace stuff, but this one is entirely useless, I removed it in my version.