New answers tagged

1

https://wiki.debian.org/Python Debian Bullseye contains 2.7, 3.7, 3.8 Debian Buster contains Python 2.7, 3.7 Debian Stretch contains Python 2.7, 3.5 Debian Jessie contains Python 2.7, 3.4


1

Probably found an answer thanks to @joan 's answer. It seems like RPi.PWM can only do software PWM, but the fan requires hardware PWM to run as smooth as possible. To do hardware PWM on any GPIO pin, the pigpio daemon has to be executed, and controlled by Python. Therefore, pigpio has to be installed first and configured to be started on boot (systemd). ...


0

There are two fundamental differences between the two approaches. The gpio utility (part of wiringPi) is using hardware timed PWM. appears to be setting a frequency of 40 kHz. The RPi.GPIO script is using software timed PWM. is setting a frequency of 50 Hz. I'd guess the frequency is the main factor.


0

TensorFlow will install on a RPi but it has been a bit of a nightmare. The instructions of the TensorFlow site are here, but I had to hunt around for version that would install since the standard one would not. That said I've just tried an install on a new 8G Rpi4 using pip3 install tensorflow and it installed straight off, so I presume TensorFlow have fixed ...


0

This Question is too vague, asks multiple questions, is not Pi specific and is really asking how to program in Python, so will probably be closed. However the use of Buttons and callbacks is relevant and Raspberry Pi OS includes an excellent Python library gpiozero which abstracts most of the nuts and bolts and allows effectively unlimited callbacks. If you ...


1

sys.exit() or technically sys.exit(0) is designed to end the Python executable and therefore your program as well. This is documented here for Python 3.7 Key thing to note is so cleanup actions specified by finally clauses of try statements are honored Hence the final message from your program in the except clause. Using your own bespoke exception is more ...


0

Well, it appears it is a timing issue. I modified the code to include a loop to capture an image and finish when the size of image.data is greater than zero. Obviously slower than the first version but it appears we can't rush the pi camera. I would prefer not to import two io/os type modules so will look into that, and also whether both forms of CAPTURE ...


Top 50 recent answers are included