Buddy the Elf won't come to life on CPB

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
JBenziger
 
Posts: 21
Joined: Wed Dec 29, 2021 4:48 pm

Buddy the Elf won't come to life on CPB

Post by JBenziger »

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
Attachments
on attribute 'PWMOut'.png
on attribute 'PWMOut'.png (256.18 KiB) Viewed 33 times
Buddy the elf.py
(5.71 KiB) Not downloaded yet

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: Buddy the Elf won't come to life on CPB

Post by danhalbert »

PWMOut is now pwmio.PWMOut, and is not longer in pulseio. So `import pulse`, and refer to `pwmio.PWMOut`.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”