pulseio library is broken on Apple Silicon hosts
See original GitHub issueI’ve checked two boards on Apple Silicon platform:
- Adafruit MCP2221A Breakout - pulseio is not supported. Hmm, why not?
- u2if firmware on RPI Pico - pulseio doesn’t work while rip pico obviously supports it! Below I’m trying to fix the issue but the library is broken because it includes invalid binaries.
- Fix /opt/homebrew/lib/python3.10/site-packages/pulseio.py
...
if detector.board.any_raspberry_pi or detector.board.pico_u2if:
from adafruit_blinka.microcontroller.bcm283x.pulseio.PulseIn import PulseIn
...
- Load the library and try to use it
import pulseio
pulses = pulseio.PulseIn(board.GP0, maxlen=200, idle_state=True)
OSError: [Errno 8] Exec format error: '/opt/homebrew/lib/python3.10/site-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/libgpiod_pulsein64'
Opa - the library is broken completely. So it doesn’t work for any board.
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Alexey Pechnikov mobigroup - GitHub
pulseio library is broken on Apple Silicon hosts Dec 10. Show more activity. Seeing something unexpected? Take a look at the GitHub profile...
Read more >Apple Silicon app builds but cannot launch
I thought it could be a signing issue and have tried automatic, manual, codesign and every option I can find for the app...
Read more >Can't build to simulator on Apple Silicon
It only popped up when trying to build on my new M1 MacBook Air and Xcode 12. I've tried everything that's been reported...
Read more >Repair your library in Photos on Mac - Apple Support
If the Photos app on your Mac is open, choose Photos > Quit Photos. Press Option-Command and double-click the Photos icon in the...
Read more >Porting Your macOS Apps to Apple Silicon
Port your existing macOS app to Apple silicon by creating a universal binary and modifying your code to handle architectural differences.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ideally the PR would be submitted to: https://github.com/execuc/u2if
The Adafruit repo is a fork. It was forked to allowing PRing changes back upstream to execuc. I don’t think we’d want to maintain a separate fork.
Ah, I didn’t realize. Closing here for now. Perhaps somebody could submit a PR to https://github.com/adafruit/u2if to add pwmio support.