OK, that should be fine, I think I've seen the issue on a Raspi 3B before. Full disclousure, I don't have a raspi to compile it on now but it should work, since it has minimal additional code other than the pigpio library functions (other than printf and usleep). Thanks!
With the new code, it should just run with the minimum PWM required to spin the motor, i.e. (950). But running raspivid simultaneously will then jitter the PWM.
Hey Joan, this code should compile. There was std::cout earlier on. Also added a while (1) { ... ; usleep(1000);} #include <pigpio.h> #include <stdio.h> #include <unistd.h> // for usleep int main(){ unsigned sampleRateUs = 1; // default = 5! unsigned configPeripheral = PI_CLOCK_PCM; // changing this...
Cool thanks Joan! FYI the brushless is driven by a brushless ESC and batteries at 12V. That ESC, brushless motor and battery setup may be replaced with some kind of PWM reader. Otherwise the ESC signal can be driven by the GPIo and also grounded. Thanks!
hardware: raspi zero W camera V2 brushless motor OS: Rasbian Jessie Lite OR Raspbian Buster Lite Minimal image based on Debian Buster Version: September 2019 Release date: 2019-09-26 Kernel version: 4.19 Size: 435 MB unsigned sampleRateUs = 1; // default = 5! unsigned configPeripheral = PI_CLOCK_PC...
Thanks for your replies joan and 6by9. joan: You can delete the pid file so you don't need to reboot. sudo rm /var/run/pigpio.pid running this command does indeed delete that pigpio.pid, BUT the first program which had already run gpioInitialize(); gpioPWM(....); gpioTerminate(); never exits, i.e. t...
I tried updating the clock source between PWM and PCM, but the issue still persists. Also tried changing up the different channels for DMA primary and secondary channels, also have the same issue. One condition that worked sometimes is that raspivid does not trigger the software PWMs, but what ends ...
Specifically, raspivid is run in a separate ssh session (headless) , and my pigpio software is run on another ssh session also. The hardware used is raspi zero w. OS used is the latest raspbian.
I’m trying to run software PWM using the pigpio library to generate software PWM. Individually without running raspivid , the spftware works and I can spin a brushless motor. However when I turn on raspivid, the software PWM jitters — specifically, the software PWM is actually output at about 10% wh...
Thanks Do you use v1 or v2 cameras? V2 camera You don't set mode for GPIO21, and it's default mode in IN. What do you want to achieve in writing to INPUT GPIO? Can you comment out the GPIO12 PWM line as one test, and the GPIO21 lines as a second test. Do you see kernel panic for the reduced tests as...
Hey, I'm running in to a kernel panic when using raspivid and pigpio together. hardware and OS : raspi zero W and newest OS Raspbian Buster / 2019-09-26 The commands I'm running (separate terminals via ssh) raspivid -t 60000 -0 a.h264 -w 1920 -h 1080 program.c runs pigpio C/IF: gpioinitialize() gpio...