I'm figuring out how to do this on my board. I don't understand how to set the pulse width and timer values on ESP32.
This is what I have. There is movement when I exectute this command, but beeping from the stepper for the frequency. But no further movement.
Code: Select all
import time import machine from machine import Pin, PWM en = machine.Pin(14, machine.Pin.OUT) IN1 = machine.Pin(2, machine.Pin.OUT) IN2 = machine.Pin(0, machine.Pin.OUT) #forward IN1.on() IN2.off() en.on() pwm2 = PWM(en, freq=1000, duty=512)
I'm using this board. https://www.velleman.eu/products/view?i ... be&lang=nl