I have the Circuit Playground Bluefruit and am making John Gallaugher's 'Buddy the Elf'. I am using his code off of github and have Buddy constructed and wired / soldered to the CPB. The code won't run. It hangs up trying to create a PWMOut object. The serial error says "attribute error: 'module' object has no attribute 'PWMOut'." I am attaching the Buddy the Elf code and a screen shot of the Error message.
I have adafruit_motor in the lib folder but don't know if it has the pulseio as well as the pwm function.
Any help will be greatly appreciated.
Thanks,
John Benziger
Buddy the Elf won't come to life on CPB
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- JBenziger
- Posts: 21
- Joined: Wed Dec 29, 2021 4:48 pm
Buddy the Elf won't come to life on CPB
- Attachments
-
- on attribute 'PWMOut'.png (256.18 KiB) Viewed 34 times
-
- Buddy the elf.py
- (5.71 KiB) Not downloaded yet
- danhalbert
- Posts: 4613
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Buddy the Elf won't come to life on CPB
PWMOut is now pwmio.PWMOut, and is not longer in pulseio. So `import pulse`, and refer to `pwmio.PWMOut`.
Please be positive and constructive with your questions and comments.