joan2937 / pigpio

pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).
The Unlicense
1.45k stars 407 forks source link

general on pigpiod daemon #580

Closed ss555 closed 12 months ago

ss555 commented 1 year ago

sudo pigpiod -s 2 -b 200 -f, what is the influence of buffer size?

I need to run PWM command every 2-5ms, is 200ms enough?

guymcswain commented 1 year ago

The PWM commands affect gpio outputs while -s -b parameters relate to gpio input sampling. So, to answer your question as written, there is no influence. But I suspect that I'm not understanding your question entirely.

ss555 commented 1 year ago

ok thanks, but what is the use of buffer when reading an input? Is it RAM allocated to the activity? we can't make it dynamic or it's too slow?

guymcswain commented 1 year ago

You really don’t need to change anything from the defaults. Are you having an issue?

ss555 commented 1 year ago

I have another setup with 2 digital inputs, that I want to sample from as fast as possible, but if it is not regular it's not worth to go fast, so I wanted to play with sampling rate and buf size