After exhausting the google searches, I decided to post here for the first time. As the title suggests, I have created the NE555P circuit and although I can calculate the frequency and high/low width, I would like to make sure that these values are correct for a matter of precision. Now, the correct and easy way to do it would be to use an oscilloscope, but I don't have access to one. Plus, it can be an interesting project for me, since it's the first time I use the GPIOs for input. For my needs, the frequency will be up to 120Hz, so it is not high at all and should be detectable by the GPIOs (from what I have read). So far I have done the following:
- Connected the LED positive to a GPIO, which I use to input the pulses.
- Firstly, I used the RPi.GPIO lib and code I wrote to loop over a number of cycles and then divide by the duration, to find the frequency. This didn't seem to work correctly at all.
- Then, I used the pigpio lib and the 2 frequency counters that are available on the website, but the output was incomprehensible to me. I looked at the code and I guess it outputs the number of pulses per sample rate(?). Though, I am not so sure and the output is not stable would change up to 50 units with the same settings.
Has someone done anything similar? I'd glad if you could share any suggestions. If you wish, I can share the code I wrote for the RPi.GPIO lib.