I am trying to run a NEMA 17 stepper motor with an A4988 motor driver. I have the LINX target firmware setup and I'm able to step the motor one step at a time using a boolean control and the Digital Write vi. But when I try the PWM vi it says the channel is not compatible with the raspberry pi. I have tried channel 18 and 32 to match the pins. I have tried channel 0 and 1 to maybe match the "PMW0" channel. Nothing works. How can I write a pwm signal to the Pi using LINX?
I have seen other posts where people have been able to do it successfully using linx, how is that possible? If I cannot use linx, is there a way to send a square wave without making one using delays?
Probably you saw posts using arduino, not rpi
you can create square waves using arrays or pt by pt.
I'm not sure how to do it with arrays. I'm trying to make a robot arm that will use multiple steppers, having square waves calculated manually might end up being overwhelming, right? Is there a hardware way around it?
I recall RPi 4 does not have a hardware PWM chip type option, so you are going to have to setup a custom LABVIEW code to talk to a 3rd party RPi PWM board. That is how I did it about a year ago. I will try to see if I can find my old code and post it here.
What kind of duty cycle are you looking for. I bet the timed loop is good for loops as fast as 10kHz. If you need to go faster, this kit has PWM capabilities. It's 90% there.