Python • Waveshare UPS battery monitoring script - help needed
Hi guys . I have modified a script from Waveshare for my UPS on a Raspberry Pi that monitors battery in the background. With my small modification it should now show a warning and shut Pi safely when...
View ArticlePython • Re: Waveshare UPS battery monitoring script - help needed
os.system executes the command in a subshell. The zenity command creates a pop up dialog. The sub shell has no idea of any desktops running.When you run it manually in a terminal, your terminal knows...
View ArticlePython • Re: Cant read holding registers from rs485 connection
I need to read holding registers from Bender Isometer that is connected to my raspi via RS-485 connector (no USB adaptor). Isometer is connected, online, its address is set to 4, baudrate is set to...
View ArticlePython • Re: Connecting RS485 via Modbus to Mitsubishi
Hi, i'm back. I tried and tried a lot of codes a none of them worked.So what i have done is to connect my raspberry to the MR-J4-40A-RJ through an RS232 to RS485 converter, the UC-232A (this one...
View ArticlePython • Raspberry Pi 5 GPIO busy
Hi everyone, I just got a raspberry pi 5 and what I noticed right away was how to use the GPIO. With RPI4 it's a lot easier, and with this one I've had a lot of problems. The GPIO control library is...
View ArticlePython • Raspberry PI5 + Python + VTK
I'm not able to find a VTK Python package for Raspberry Pi 5 (Python 3.11.2).How to install it ?There is some pre-made package and instructions to install it ?PS:I've tried to make VTK from the vtk...
View ArticlePython • Re: Raspberry Pi 5 GPIO busy
Can you put you pieces of code in between [code][/code] tags?That makes the difference between:from gpiozero import Buttonfrom time import sleepbutton = Button(2)button.wait_for_press()print('Button...
View ArticlePython • Re: Cannot determine SOC peripheral base address
The first commands works fine, second one shows errorStatistics: Posted by Virksaab — Wed Jun 05, 2024 4:19 pm
View ArticlePython • Serial communication problem
Hi,I have an HKW DCF clock (DB9 plug) and I would like to retrieve the time from it on my Raspberry Pi. Unfortunately, I can't use NTP because the Raspberry Pi will be in a location without internet...
View ArticlePython • Re: Serial communication problem
perhaps you could try the following:- remove the sleep(1) after sending the 'o'- instead of using readline, use for test purpose a while loop with read(size=1) and print result print( f"res {res:02x}...
View ArticlePython • Re: Syntax error when installing pynput with pip install pynput
Hi,Thanks for the input. I installed it with Python3 - seems to work.CheersMichaelStatistics: Posted by Woodz — Thu Jun 06, 2024 6:58 pm
View ArticlePython • Freenove ultimate starter kit raspberry pi
im doing project 14 which uses python and the code is Code: cd ~/Freenove_Kit/Code/Python_Code/14.1.1_Relay python Relay.pythis is meant to make the LED run using to motor but it turns on one when i...
View ArticlePython • Re: gpiozero RuntimeError: Cannot determine SOC universal base address
Sorry did not read the service part. The guide to all things startup is here: https://forums.raspberrypi.com/viewtopic.php?t=314455Thank you, I solved this problem by modifying the python programHow...
View ArticlePython • Re: Freenove ultimate starter kit raspberry pi
im doing project 14 which uses python and the code is Code: cd ~/Freenove_Kit/Code/Python_Code/14.1.1_Relay python Relay.pythis is meant to make the LED run using to motor but it turns on one when i...
View ArticlePython • Used to work now doesnt
Hello All,I have a raspberry pi zero w outside in my wifes garden. It has a couple relays that control water valves and a button that I use to allow her to manually water it in addition to my...
View ArticlePython • Re: Used to work now doesnt
Add logging to your code at each stage to help isolate the issue:Code: import logginglogger = logging.getLogger(__name__)logging.basicConfig(filename='test.log',format='%(asctime)s %(message)s',...
View ArticlePython • Feh image viewer - file name to variable
Hi, i am fairly new to python programming but enjoying it so far.Using a python script i am wanting to have a slideshow running with Feh image viewer. The slideshow is started with a Popen command,...
View ArticlePython • Re: Feh image viewer - file name to variable
There is an option reported in the docs --cycle-once but this unfortunatley does not work for feh on my Pi.This code could work. It starts feh in background and uses signal SIGUSR1 to advance to next...
View ArticlePython • Re: Pi 5 pigpio no longer available. How to read 9 bit serial
Just in case anyone else is struggling with this I'm going to be controversial and state that currently the Pi 5 can no longer interface with non conventional serial hardware (i.e. anything greater...
View ArticlePython • Raspberry Pi 5 board + Python 3.11 + OpenCV4.9 + Global Shutter Camera
Dear Colleagues.Tell me how to install Python 3.11+OpenCV4.9+Global Shutter Camera for Raspberry Pi 5.And how can you access the camera in a Python program through OpenCV library functions?Statistics:...
View Article