2

I am trying to control multiple servo motors with a Raspberry Pi. I am using a USB to TTL cable for this. I am currently sending following serial commands for the movement.

  • --> gpio -g mode 18 pwm

  • --> gpio pwm-ms

  • --> gpio pwmc 192

  • --> gpio pwmr 2000

So we set the frequency for the port 18. Similarly I repeat the steps for 12 and 21 where I have connected two other motors.

  • --> gpio -g pwm 18 100
  • --> gpio -g pwm 12 100

after this command, the movement is seen only for the Motor at pin 18 and not for the motor at 12.

How can I correct this? Is there any different frequency to be used? see the attached image for the block diagram

  • I don't understand what you are doing. You mention a dongle but then detail the commands of the wiringPi utility gpio which acts directly on the Pi GPIO. What is the dongle doing? – joan Dec 6 '17 at 8:31
  • The dongle is used for the serial communication between the port (for laptop) and the TX RX for the raspberry pi. I am trying to send serial commands from the terminal. To mention: these commands work perfectly for the serial communication with a single motor. Controlling multiple motors is the issue. – onedev Dec 6 '17 at 14:22
  • 1
    Log on to the Pi and use the commands directly. Pointless trying to diagnose remote faults. – joan Dec 6 '17 at 14:26
  • Getting the same error. – onedev Dec 6 '17 at 19:19
  • I'm afraid I still don't understand what you are doing. Could you provide photo(s) showing the Pi and connections to the servos? – joan Dec 6 '17 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.