You are not logged in.
Pages: 1
Topic closed
I am trying to use the PWM pin mode to control a basic motor. As documented in the Raspberry Pi Rex User Guide, it says that GoTo RPI__PWM18 will produce output on pin 18. I am getting no output from pin 18 when I implement this block. However, if I rename the block to RPI__GPIO18, I get output on pin 18. A picture of the block I've set up is attached. Any suggestions on setting up PWM would be helpful. Thanks in advance.
Offline
Please, can you attach whole Rex project (.mdl files)? It would be much easier to find the issue in your implementation.
Regards, Tomas
Offline
Attached are two .mdl files: motor_task.mdl and motorTest.mdl
On the Pi (without REX) we use the RPIO library and the PWM commands to control the output and change the frequency and/or duty cycle, but have run into some issues trying to copy this type of functionality via REX. Is there a demo file for a working PWM setup with a Raspberry Pi? Do you have any guides for the proper setup for a Pi?
Offline
The PWM range is 0..1023. Multiply your boolean signal by 1023 to get full duty cycle (use GAIN block).
Offline
Pages: 1
Topic closed