Hi, everyone! I am a newer with micropython and need help now. I am using BrainPad by GHI electrinics. When I try run machine.PWM, according micropython manual it raise exception File "", line 1, in
AttributeError: 'module' object has no attribute 'PWM'. Who is familiar with that or have an idea, please, help me!
BrainPad micropython PWM
Re: BrainPad micropython PWM
It looks like the stm machine module doesn't have PWM. Instead, you can create PWM using the pyb.Timer module.
See: https://github.com/dhylands/upy-example ... wm_test.py for an example.
I've also started to put together a board support package for the BrainPad, which you can find here:
https://github.com/dhylands/BRAINPAD
Servo 1 is connected to PA3 and Servo 2 is connected to PA0. PA0 uses channel 1 on timer 2 or 5, and PA3 uses channel 4 on timer 2 or 5.
See: https://github.com/dhylands/upy-example ... wm_test.py for an example.
I've also started to put together a board support package for the BrainPad, which you can find here:
https://github.com/dhylands/BRAINPAD
Servo 1 is connected to PA3 and Servo 2 is connected to PA0. PA0 uses channel 1 on timer 2 or 5, and PA3 uses channel 4 on timer 2 or 5.
Re: BrainPad micropython PWM
Thank you a lot! Good job! That makes my life easier