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

Python • ipykernel package problem

I can't seem to run the Juypter notebook as it keeps saying that the ipykernel library isn't installed in the global python installation, is it ok to install this on the global python installation?I...

View Article


Python • Cleanest way to turn on GPIO based on input string

Hello, All.I have a (silly?) question.Let's say I have a variable:Code: led = 12such that the following command would turn on an LED at pin 12:Code: GPIO.output(led, GPIO.HIGH)Very simple.Now, what if...

View Article


Python • Re: Python User Guide

Python is not quite Python on a pi5.There is the complication of needing to use a VENV which does seem to trip an awful lot of people up.And don't forget the python libraries that worked on all...

View Article

Python • Re: Raspberry Pi 5 - "out of memory error"

I'm using the following library to control WS2812 leds on a Pi5 via SPI:https://github.com/niklasr22/rpi5-ws2812Statistics: Posted by rpiMike — Mon Mar 24, 2025 1:14 pm

View Article

Image may be NSFW.
Clik here to view.

Python • Wait for 2 Buttons to be pressed.

Hi all,I have 2 Buttons connected to the GPIOs of the Raspi.I want the Python script to wait for either one of them being pressed.Unfortunately i am not able to get it running.Here is the basic...

View Article


Python • Re: Wait for 2 Buttons to be pressed.

I may be reading this wrong but if you wantI want the Python script to wait for either one of them being pressed.and to keep going I think you need an additional inner loopCode: while True:...

View Article

Python • GPIO .venv problems

My daughter has managed, with a bit of help, to create her first quantum computing program using qiskit. Remarkably, it works! However, she wishes to indicate the alive or dead Schrodinger's cat via...

View Article

Python • Re: Cleanest way to turn on GPIO based on input string

I'm afraid I don't understand the question. Initialize a thousand pins? Rpi only has a few... For heaps of leds you can use the adressable ones, or a matrix.Statistics: Posted by kheylen25 — Mon Mar...

View Article


Python • Re: RuntimeError: Failed to add edge detection

Seems to be, whichever 'RPi.GPIO' this is, it has determined the revision code of the Pi hardware to be in the old-style format which shouldn't be the case for a Pi 3B+.Only a few Pi should be using...

View Article


Python • Re: GPIO .venv problems

Which operating system are we running on the Pi Zero 2W? Bookworm 64-bit with desktop or something else?Was the new venv created with system packages like this Code: python -m venv...

View Article

Python • Setup Raspberry Pi 5 Serial Over GPIO

I had quite a bit of trouble simply finding the information needed to implement what I wanted so I am going to post this to help anyone else interested. For the OS I am using Ubuntu 24.04.2 LTS. The...

View Article

Python • Re: Python User Interface design using Microsoft Paint and GIMP

Thankyou for sharing I was struggling with the UI for the app I am creating about customized caps dubai this guide helped me alot to solve it.Statistics: Posted by sarahdenver — Tue Mar 25, 2025 8:07 am

View Article

Python • Environment is externally managed?

Hi,I got a raspberry pi 4B, but every time i try to install the os in it, it says "environment is externally managed".Everything is mine - the pi, the SD and so on. No company or organization gave me...

View Article


Python • Re: Environment is externally managed?

That's a python message?Screenshot if it is not.If it is, did you follow the link?Statistics: Posted by bensimmo — Tue Mar 25, 2025 8:44 am

View Article

Python • bl-touch V3.1 with Raspberry pi 4 model b and python

Hi all,For my project I want to use a bl-touch V3.1 in combination with a raspberry pi 4 model B and a python script to control it. I found on the website all g-code commands to power the bl-touch,...

View Article


Python • How to capture the output of the micropython.mem_info() on Pico ?

Code: import micropythonmicropython.mem_info()This code prints some information about the system memory. It is possible to catch that text on a Raspberry Pi Pico W with MicroPython firmware, so I can...

View Article

Python • Re: How to capture the output of the micropython.mem_info() on Pico ?

Maybe try GC (Garbage Collection) https://docs.micropython.org/en/latest/library/gc.htmlStatistics: Posted by DS256 — Wed Mar 26, 2025 3:03 pm

View Article


Python • Creating Separate PWM Objects in Multiple Threads

Hello, All.I'm wondering how one might go about creating a single PWM object in multiple threads, as to prevent multiple threads from attempting to access the same PWM object at the same time. This...

View Article

Python • Re: Sending lists over UART with Python

Reading binary data is easier as parsing ASCII. If well-structured, you have a start signature, then the data and maybe an ending signature. The messages can always be the same length.I worked with...

View Article

Python • Re: Showing list contents in thonny

Next challenge: I scraped a URL and the contents of the soup was "forbidden" Did I miss something or is this web operator forbidding me from scraping their page?Code: import requestsfrom bs4 import...

View Article
Browsing all 1225 articles
Browse latest View live