Python • Re: AttributeError: 'NoneType' object has no attribute 'shape'
Sir:Q1 can you open the camera?Q2 Which camera?Q3 Which OS(bookwworm, Bullseye, ...)?Q4 Is your title appropriate? Hi i have a kind of problem like this. I am trying to make a camera system with some...
View ArticlePython • Failure of successive file.writes in callback routine
Code: def lightcallback(channel): # night time function global flagnight # do this to use variable within function time.sleep(0.1) # DEBOUNCE delay to remove false positives if GPIO.input(18)==0: #...
View ArticlePython • Re: Failure of successive file.writes in callback routine
Need the complete code, callbacks should be as short (in time) as possible.Statistics: Posted by rpiMike — Fri May 03, 2024 11:25 am
View ArticlePython • Re: Failure of successive file.writes in callback routine>SOLVED
THIS IS NOW SOLVED.The function call "recordandsave" was changing the working directory such that the successive file writes were not going to the intended directory. Apologies for putting this on...
View ArticlePython • Re: Learning Python and the Raspberry Pi in general
Here are some resourcesRaspberry PI Foundation https://www.raspberrypi.org/Raspberry PI Foundation Projects https://projects.raspberrypi.org/enRaspberry PI Cookbook...
View ArticlePython • Syntax error when installing pynput with pip install pynput
Dear all,When I try to install pynput on my Raspberry Pi (Python 2.7.16)I get the error below.Anyone knows how to install pynput properly?Thanks!CheersMichaelLooking in indexes:...
View ArticlePython • Re: Syntax error when installing pynput with pip install pynput
Which version of Raspberry Pi OS are you running? (Buster?)Statistics: Posted by neilgl — Sat May 04, 2024 8:27 pm
View ArticlePython • Problem with button.value
I have gpiozero version 2.0-1 on my RPi5.I wrote a short program in python that works - led and button can cooperate Code: from gpiozero import DigitalInputDevice, LEDled = LED(17)led.value = 0button...
View ArticlePython • Re: Problem with button.value
Maybe your circuit and code do not match with each other.Statistics: Posted by barshatriplee — Sun May 05, 2024 12:03 pm
View ArticlePython • Re: list/dict error - not understanding
Thanks everyone for clearing up my confusion. I see where and why the error was raised but so far, nobody has taken a stab at why it worked before and now doesn't.I will implement the new code example...
View ArticlePython • Problem with ST7735 display code.
When I run the following codeCode: from PIL import Imagefrom PIL import Imagefrom PIL import ImageDrawfrom PIL import ImageFontimport ST7735import osdisp = ST7735.ST7735(port=0, cs=0, dc=24,...
View ArticlePython • Re: Problem with ST7735 display code.
The error seems to be being reported offCode: font2 = ImageFont.truetype(font_path, 16)So my guess is that font_path is causing OSError: cannot open resource which means it does not point to...
View ArticlePython • Having issue in installing google-api-python-client...
I am having issue in installing these libraries for google drive integration on raspberry pi.error message is as follows"sudo pip3 install google-api-python-client google-auth-httplib2...
View ArticlePython • Re: Play audio on Boot on headless setup
See this post viewtopic.php?p=2218221#p2218221And are you running Bookworm or Bullseye on that Zero 2? (Or LITE version of it)Statistics: Posted by neilgl — Mon May 06, 2024 12:00 pm
View ArticlePython • Re: Gpiod 'get_line' Error
How did you install gpiod? From the errors you are seeing it looks to me like you have a recent gpiod installed, so v2.I have the latest gpiod (2.1.3) installed from PyPI with pip:Code: $ pip...
View ArticlePython • Creating two video streams with two cameras
Hi,I am looking for some help, as I am stuck.I have a Raspberry Pi 5 with two PiCam 3 cameras. I am trying to stream from both cameras, as I want to be able to use either one or both from a web...
View ArticlePython • Re: Creating two video streams with two cameras
Worth checking out raspi-cam-srv which can stream from dual cameras, amongst its many other features.Statistics: Posted by sandyol — Mon May 06, 2024 7:35 pm
View ArticlePython • Re: Having issue in installing google-api-python-client...
If you are running Bookworm, then the default is to create Python Virtual Environments for all projects. Create one, activate it, then you should be able to run PIP. See...
View ArticlePython • Debouncing digital inputs, best practices ?
Hi there,I'd like to debouncing about to 20 inputs.With Arduino, I do it easily (in c). Not even with proper interrupt or timer.Just counting the time, and ignoring any change during an amount of...
View ArticlePython • Re: Debouncing digital inputs, best practices ?
If using the gpiozero Button, you can set bounce_time:https://gpiozero.readthedocs.io/en/stab ... tml#buttonStatistics: Posted by rpiMike — Tue May 07, 2024 1:57 pm
View Article