Python • Re: Does RPi.GPIO work in Bookworm??
Ive since read that RPi.GPIO is no longer available in Bookworm but can find anything official. If that is the case then thats a real shame and also means I need to re-write a lot of my old python...
View ArticlePython • Pico W + socket server + clients
hello everyone,i have maid a main code on pico W which purpose is :1. count number of click on A , B and C buttons.2. save the number of click internally and initiate the counter from them in case of...
View ArticlePython • Re: Script for waveshare relay module
Hi AME and B.Goode. You were absolutely right about the boards. Sorry about the confusion over 'hats'. I simply called the relay board a hat because it sits on top. I thought that classed it as a hat....
View ArticlePython • Is sleep function is not accurete in python?
Is there a better solution instead for using the sleep command with pyhton on a raspberry pi board?My python program has sleep(1), which means one second delay and when the code has run for 3600 times...
View ArticlePython • Re: Is sleep function is not accurete in python?
https://forums.raspberrypi.com/viewtopic.php?t=296615Statistics: Posted by gordon77 — Sat Jun 22, 2024 3:22 pm
View ArticlePython • Re: Re Bookworm on Pi 5, no vcgencmd import for python
How do I import vcgencmd into Thonny? I have tried installing vcgencmd PyPi packages and plug-ins. I got the same error.Statistics: Posted by Tigerg2002 — Sat Jun 22, 2024 7:01 pm
View ArticlePython • Re: Running Sudo Causes My Code to Not Work
But then when I ran sudo (as I need to use sudo for some other stuff later on), the code would immediately stop.Are you running in a Python Virtual Environment? If not then by running under SUDO...
View ArticlePython • Re: Does RPi.GPIO work in Bookworm??
is there a simple drop-in replacement?Yes - https://forums.raspberrypi.com/viewtopic.php?t=360130Code: sudo apt remove python3-rpi.gpiopip3 install rpi-lgpioStatistics: Posted by hippy — Mon Jun 24,...
View ArticlePython • Add a timer to GPIO input for RPi
Hi all, Ive tried this script I found online and it works great for me. However, I would like to prevent an accidental press from sending the text. can someone please help me to where it only sends...
View ArticlePython • Re: Add a timer to GPIO input for RPi
Personally I would use the gpiozero library and the button hold_time parameter:Code: from gpiozero import Buttonfrom signal import pausedef say_hello(): print("Hello!")button =...
View ArticlePython • Raspberry Pico Websocket
HelloI'm working on a personal project for sending some websocket message from pico w with micropython.I use this library aiohttp and I'm trying to send some messsage when a button is pressed Code:...
View ArticlePython • Re: Can't list installed libraries
Try:ps xps uOrps a In terminalStatistics: Posted by Thirty345 — Tue Jun 25, 2024 5:28 pm
View ArticlePython • Help with reading multiple CAN messages with python
Goal of the project: I am using a raspberry pi and MCP2515 dual CAN board to read broadcasted 1MB CAN data from a standalone ECU in my car. The Pi will interpret the incoming CAN messages from the...
View ArticlePython • Re: Help with reading multiple CAN messages with python
If I uncomment the remainder of the monitorlist (which is all of the messages I'm trying to read) I get errors when compiling and cannot figure out how to interpret a message individually from that...
View ArticlePython • Driving motors at different frequencies using pigpio
I need to drive one step pin at e.g. 100us per pulse and another at e.g. 70us per pulse. I think this should be possible based on the library docs, for wave_add_generic it says "The pulses are...
View ArticlePython • Re: Driving motors at different frequencies using pigpio
100us per pulse and 70us per pulse is ambiguous, and does not specify the frequency (which is in Hz). Are you talking about the period, or the pulse width? What exactly are you trying to...
View ArticlePython • LCD with i2c backpack, installing libraries for python3
Raspberry Pi 4Debian Linux 12 (bookworm).Was trying out a few tutorials on programing a i2c lcd screen with my RPI 4.Many of the tutorials are wanting me to install the libraries with PIP. However...
View ArticlePython • Re: LCD with i2c backpack, installing libraries for python3
Simple and easy: follow the instructions given by pip.Statistics: Posted by memjr — Thu Jun 27, 2024 3:29 am
View ArticlePython • Running a PyQt5 script from command line
Python3.9Made a simple window with PyQt5. Code: import sysfrom PyQt5.QtWidgets import QApplication, QWidgetapp = QApplication(sys.argv)window = QWidget()window.show()app.exec()Able to run in from...
View ArticlePython • Re: Running a PyQt5 script from command line
Code: b5@b5:~ $ cat /etc/os-releasePRETTY_NAME="Debian GNU/Linux 11 (bullseye)"NAME="Debian GNU/Linux"VERSION_ID="11"VERSION="11 (bullseye)"VERSION_CODENAME=bullseyeID=debianStatistics: Posted by...
View Article