How To make Raspberry Pi Hardware PWM off after startup - raspberry-pi

I am driving motor using ESC with Hardware PWM signal comes from Raspberry Pi ,I set the GPIO 19 (PIN 35) to be PWM1 , the problem is when the Raspberry Pi startup it gives output value to PWM1 (GPIO 19) which causing the motor to start spinning at slow speed ,
How can stop that ? I want GPIO 19 to stop sending signal after the startup , unless I do it my self .
NOTE : when the PWM was disabled in (/boot/config.txt) the GPIO 19 was Input ,so its wasn't sending any signal ,But after activating the PWM1 it changed to ALT5 and start giving signal just after startup.

Related

Can I directly connect a GPIO OUTPUT and INPUT

Can I directly connect a GPIO OUTPUT and INPUT of a raspberry pi? I heard that this would be dangerous in case that both GPIOs are accidentally set as outputs and that it is better to put a resistor of at least 220 ohm in between (not to ground?). Is this really necesarry?

Am I slowing down my Raspberry Pi Zero W by setting cpu_freq=250?

I use this library over SPI to control some RGB Leds.
When using the Raspberry Pi 3, I have to set cpu_freq=250 on /boot/config, as far as I've understood, it has something to do with the bluetooth device running on the default serial port.
Now, using the Raspberry Pi Zero W I'm algo having to set that flag.
My questions is, what is the correct cpu clock for both Pi 3 and Zero W, and am I slowing my Pi performance by setting this flag?

No clock signal at the SCL pin of Sparkfun nRF52832 breakout board

I am trying to use the Sparkfun nRF52832 breakout board as a master in I2C communication. I am using Arduino IDE to program the module. I defined pins 24 and 25 as SCL and SDA, respectively, and used wire.begin() in the setup to configure it as a master. I expect to see the clock signal when I connect the board to the oscilloscope, but I just see 3.3v dc signals at both scl and sda pins. Would you please tell me what's wrong?
I used pull-up resistors.

Controlling DC motors Using RaspberryPi and MDD10A motor driver

I am working on a robotic project and encountering difficulties in controlling two Dc motors. Anyway, I am using raspberry Pi 3 and Dual Channel 10A DC Motor Driver to drive two DC motors (Dual shaft self-locking DC worm gear motor). I am using the driver to drive bigger motor capacity and make them work as a servo motor. I managed to send signal and run the motors but I can't stop them running. Please any help, I would be thankful.
Import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12,GPIO.OUT)
pwm=GPIO.PWM(12,100)
pwm.start(20)
time.sleep(1)
pwm.stop()
In fact, I have little knowledge on controlling the motors.. if you can guide me or show me good reference I will also be grateful .

Why the servo keep shaking when I used PWM to control it on raspberry pi

I am trying use GPIO to simulate pwm output to control a servo on my raspi B board. But the servo keep shaking and can't stop in a expect postion. Any one know the reason about that?
The source code may like below:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT)
vertical = GPIO.PWM(12, 50)
vertical.start(14)
time.sleep(0.2)
vertical.ChangeDutyCycle(0)
I add a PCA9685 which is an I²C-bus controlled 16-channel PWM output between Raspi and servo. The servo can works correctly.
My guess is that Linux run on Raspi is not RTOS. So PWM output may not stable.