-
Notifications
You must be signed in to change notification settings - Fork 62
Add RPi (non-pulseio) support #18
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
Conversation
just to check, did you mpycross before importing and taking the gc memory readings? |
@ladyada yes -- both readings were with .mpy file |
I tested thsi on a trinket_M0 and on a Raspberry Pi 3B + -- Note: I cannot test the "led" example since I don't have that hardware. |
@jerryneedell - thank you! @tannewt is 500 bytes ok? |
I think its fine for now. How about moving it into a private function? That way if I ever do lazy bytecode loading it'll stay out of memory. Are there plans to add pulseio support to Blinka? We should remove it at that time. |
How do I move it to a private function? |
pulseio for blinka is a long ways away |
@jerryneedell yup! and by private I mean named with a starting underscore. |
Ok. I’ll try it and post it for your review. Hopefully this weekend. |
@tannewt Is this what you are looking for re: private functions? |
@tannewt does this need more work? |
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.
Yup! Exactly. Thank you!
Updating https://github.com/adafruit/Adafruit_CircuitPython_DHT to 3.2.1 from 3.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_DHT#18 from jerryneedell/jerryn_fix_pr_14 > Merge pull request adafruit/Adafruit_CircuitPython_DHT#17 from jerryneedell/jerryn_None > ignore the board module imports in .pylintrc Updating https://github.com/adafruit/Adafruit_CircuitPython_Slideshow to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_Slideshow#8 from kattni/folder-fix
This replaces PR #14 - it reconciles the changes with the current master with a few additional changes from the original PR from @ladyada
1)Main fix was to correct a bug in the pulseio code that had the relational test for the delay waiting for pulses inverted. This broke the pulseio version -- OK now
2)Attempted to make the non-pulseio more like the pulseio in its treatment of the incoming string of transitions - only use the last 81 transitions received. There are still a lot of errors when running on a Raspberry Pi, but this seems to help a bit - still > 10% failed readings
2) changed timeout waiting for pulses on non-pulseio to .25 sec (was .1) to match pulseio version. No apparent impact.
To look at the memory impact I ran the test code from @brennen to look at gc.mem_free at various points with the new code and with the current master code.
It looks like the new code consumes ~500bytes additional RAM if I am interpreting this correctly.
Is that OK?
Here is the same test with the current master - (no RPi code )