I have project that works with raspberry pi 3 which control a motor speed through PWM0 pin (GPIO 19), the problem is that raspberry pi give high state after startup , which cause the spinning of the motor at low speed ( because the PWM is giving low duty_cycle value ) ,i want to avoid this by making PWM0 pin (GPIO 19) give low state during booting and after start ,that will prevent the motor from start spinning , unless i started its script that will give the PWM0 high state .

  • 1
    Try writing in sentences. Without some idea what you have actually done it is difficult to work out what you are asking.
    – Milliways
    Oct 27, 2021 at 1:06
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Oct 27, 2021 at 9:02

1 Answer 1


GPIO 19 will never be high and will not be a output unless you do something to make it so.

All pins are initially configured as inputs with either pullup or pulldown; in this case GPIO 19 is configured as input with pulldown.

NOTE again GPIO 19 is NOT a "PWM0 pin" and won't unless you configure it.

You can configure a pin shortly after boot, using the gpio option in config.txt, but this would be a sledgehammer approach to solve whatever is actually wrong.

  • Thank you for your reply , I forget that i forced this gpio to be output , using (sudo nano /etc/rc.local) , now I removed what I wrote and it works , now the gpio 19 not sending any thing after start , But after activating PWM at GPIO 19 using (sudo nano /boot/config.txt) it becomes neither Output nor Input ,it is ALT5 that's what the (gpio readall ) command gave me as a result , and the problem appear again the PWM is sending signal after startup .
    – 0ussama
    Nov 2, 2021 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.