Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Raspberry Pi 4 LINX PWM

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?

0 Kudos
Message 1 of 6
(200 Views)

The Linx shared library for the Raspberry Pi does not currently implement the PWM functionality.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 2 of 6
(165 Views)

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?

0 Kudos
Message 3 of 6
(160 Views)

Probably you saw posts using arduino, not rpi

 

you can create square waves using arrays or pt by pt.

 

 

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 4 of 6
(157 Views)

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?

0 Kudos
Message 5 of 6
(154 Views)

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.

0 Kudos
Message 6 of 6
(38 Views)