Quantcast
Channel: Raspberry Pi Forums
Browsing all 1225 articles
Browse latest View live

Python • Re: RPI freezes by running this code

I created this "simulation" to run my code from RPI on a laptop. I used randint for the sensor values and also took a few shots from the robot's camera to get everything right. This code running on a...

View Article


Python • Re: Camera Window won't jump out

this works on my pi5... note my change in predictor pathCode: from imutils.video import VideoStreamfrom imutils import face_utilsfrom threading import Threadimport numpy as npfrom gpiozero import...

View Article


Python • Re: How to lock AWB with Picamera2 API

If you want to stop the AWB changing after it's had a few moments to settle, sendCode: picam2.set_controls({'AwbEnable': False})If you have specific colour gains that you want to set, useCode:...

View Article

Python • Re: very noisy SoC temperature measurement (RPi5)

After reading all this, I just round the temps to the nearest degree, which I think is good enough for my purposes.Code: Time CPU Core Vcore Temp....Min....Max Health10:31:43 2800 910 0.9996 48 48 48...

View Article

Image may be NSFW.
Clik here to view.

Python • Best libraries to use when trying to capture voltage from the...

Hello, I am working a project and using the Raspberry Pi 4 model B. The project that I am working on is to create a device that can read the voltage from an LVDS signal. This signal will be fast and...

View Article


Image may be NSFW.
Clik here to view.

Python • Re: Best libraries to use when trying to capture voltage from the...

Hello, I am working a project and using the Raspberry Pi 4 model B. The project that I am working on is to create a device that can read the voltage from an LVDS signal. This signal will be fast and...

View Article

Python • Re: Error when using p5 package in python

Do you happen to know if your Pi is running the latest "Bookworm" version of Raspberry Pi OS?There have been some changes in Python with "Bookworm" compared to the previous version "Bullseye"Also, is...

View Article

Python • VENV and Missing Package

Having never used Virtual Environments before, and being forced (more or less) into using one because I'm on a RPi 5 and Bookworm, I've tried to set up one so I can run a previously working Python...

View Article


Python • Re: VENV and Missing Package

On a Pi 5 running Bookworm 64-bit, I created a venv (without system packages) activated it and installed paho-mqtt via pip. However, pip install bluepy failed "...Running setup.py install for bluepy...

View Article


Python • Re: package install

For more information visit http://rptl.io/venvYes.I had already directed you to that Raspberry Pi documentation.Where do you get stuck or need further help?Statistics: Posted by B.Goode — Wed Feb 07,...

View Article

Python • Re: RPI freezes by running this code

Code: self.canvas.create_polygon(self.polygon_points, outline="white", fill="white", tags="map_polygon")Commenting this make's it work on RPI.I execute it by pressing F5 in Geany.Statistics: Posted by...

View Article

Python • Re: Please help, python hates me.

cap = cv2.VideoCapture(0) won't work in bookworm.try picamera2.. example belowwhere have to put the haar_cascade_xml_file ?Code: import cv2import numpy as npfrom picamera2 import Picamera2# start Pi...

View Article

Python • 2D room mapping strategy using robot

Hello, I am working on a robot that should map the ground of room(=the area where it can move). For mapping I use ir speed encoders on the motors, a compass and an array of points on the ground from a...

View Article


Python • Serial communication via GPIO Pins?

Hello!I have a serial device with 4 pins (GND/VCC/TXD/RXD), that I connect right now via an UART USB Adapter. Instead I would like to connect this serial device via GPIO pins on my Raspberry Pi 2 W so...

View Article

Python • Re: Serial communication via GPIO Pins?

Is that "Raspberry Pi 2 W" a Raspberry Pi Zero 2 W or a Pi2 with a USB WiFI dongle attached?In general we can attach UART (serial) devices to the GPIO Pins provided we do not exceed 3.3V on the GPIO....

View Article


Python • Re: VENV and Missing Package

Well, as usual, it was something I was doing wrong...I'd been executing the following command....sudo python /home/pi/python/main/jbd-bms-mqtt.py -a "a4:c1:37:31:b8:d0" -i 0 -t solar/laundryI should...

View Article

Python • Trying to install python GitHub program but keeps throwing errors...

Hi,I’m trying to install GonoteGo on my pi 400 running bookworm pi so using these instructions: https://github.com/dbieber/GoNoteGo/blo ... llation.mdHowever I can only get as far as virtualenv...

View Article


Python • Re: Trying to install python GitHub program but keeps throwing...

Can someone who is more knowledgable with python help or tell me what version of pi so this project is compatible withPerhaps the owner of the Github project you are following would be a good source...

View Article

Python • Re: Writing generated audio as FLAC?

Digging around, it seems I need the script to convert from <class 'bytes'> to <class 'numpy.ndarray'> or else have the sine wave generated directly as a <class 'numpy.ndarray'>...

View Article

Python • Issues building numpy wheel

Hi,I’m following the installation instructions for this project: https://github.com/dbieber/GoNoteGo/blo ... llation.mdFollowing on from previous advice this project is built for pi os buster python...

View Article
Browsing all 1225 articles
Browse latest View live