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

Python • Pi5 + Python + pygame + official 7" Screen 2

I currently have python code that runs on the original 7" official touchscreen (ft5406) which uses a quite old driver to get multitouch x+y positions from the screen so that I can use them in my...

View Article


Python • One driver library for BMP585, BMP581, BMP390, BMP280, and now...

MicroPython Library for:1) BMP585 - water resistant & highly accurate (cm) pressure, temperature, and altitude.2) BMP581 - highly accurate (cm) pressure, temperature, and altitude.3) BMP390 -...

View Article


Python • Re: Anaconda -> Python 3.12

Last time I upgraded to Python 3.12, it didn't go well. None of my gpio packages were workingAnaconda from my experience from Windows installation, is a bulky software. You might want to stay away...

View Article

Python • Re: tkinter display issues switching between frames

I solved my problem switching from tk to qt.Statistics: Posted by bestof27 — Fri Jan 31, 2025 6:17 am

View Article

Python • Re: Pi5 + Python + pygame + official 7" Screen 2

Have you tried using pygame with the new screen? I would expect the mouse coords to update in the same way as the old screen?Statistics: Posted by rpiMike — Fri Jan 31, 2025 2:25 pm

View Article


Python • Script runs fine from Thonny, but not SSH or Geany

I have a project that uses load cells and an HX711 to measure the weight of my dog food bucket every hour. I'd like to set it up to run on an SSH command or cronjob, or maybe initiated by a switch on...

View Article

Python • Re: Aiortc video0

It should be /dev/video0Statistics: Posted by stuart.edge — Sun Feb 02, 2025 3:54 am

View Article

Python • Re: Script runs fine from Thonny, but not SSH or Geany

Are you running it from the command line in the directory (folder) where the calibration_data.json file is?If not, you should either change into that directory first, or specify the full path name of...

View Article


Python • Unable to use picamera2 in a python program

I've been struggling to use the picamera2 package on my Raspberry Pi 5 Model B. Whenever I import it, the program is unable to run with the error:ImportError: libcamera.so.0.3: cannot open shared...

View Article


Python • Minecraft Pi

Hi ! I was using Minecraft Pi a while ago on Raspbian, and i used Python with it to do advanced stuff. I recently reinstalled Raspbian and i didnt find Minecraft Pi into the menu. I downloaded the...

View Article

Python • Re: Keep getting this error message

I totally mucked things up creating a venv. I won't be doing that again. I've gotten myself into a coding challenge, so can't do it again for the foreseeable futureStatistics: Posted by RaspyHat — Sun...

View Article

Python • Re: Unable to use picamera2 in a python program

It certainly looks like the libcamera python bindings are missing. TryCode: sudo apt install python3-libcameraIf it's still not working, maybe say* Exactly what OS you have (the regular Raspberry Pi...

View Article

Python • MCP3008 responds only to channel 0/1

I have a raspi5/mcp3008 problem that i am unable to solve.The MCP responds only to channel 0. Channel 1 seems to do something in concert with ch0. looks like its measuring differential. ch 2/3, 4/5...

View Article


Python • Re: MCP3008 responds only to channel 0/1

Perhaps you try these changed code lines:Code: tmp = MCP3008(channel=channel) # change this linedef meetmcp(channel): tmp.channel=channel # change this line waarde = (tmp.value * 3.3-0.5)*100 print...

View Article

Python • Install trimesh?

I'm not a programmer, but I have a python program that I would like to try. It requires trimesh, but when I enter pip install trimesh in terminalI get a warning with stuff I really don't understand...

View Article


Python • Re: Install trimesh?

I'm not a programmer, but I have a python program that I would like to try. It requires trimesh, but when I enter pip install trimesh in terminalI get a warning with stuff I really don't understand...

View Article

Python • Need help with Pico 2 W

Trying to follow guides for connecting to WiFi but nothing seems to work. https://www.tomshardware.com/how-to/con ... e-internetHow do I get Code: import network to work? This is the error I getCode:...

View Article


Python • Re: Need help with Pico 2 W

Trying to follow guides for connecting to WiFi but nothing seems to work. https://www.tomshardware.com/how-to/con ... e-internetHow do I get Code: import network to work? This is the error I getCode:...

View Article

Python • Import data and passing a variable into binary

Code: #secrets.pymyserver = "myserverdata.s1.eu.hivemq.cloud"Code: import secrets.pyserver = b'secrets.myserver'.Is it possible to call my variable this way with a b'secrets.myserver' and have it pass...

View Article

Python • Re: Import data and passing a variable into binary

I am unsure what you mean by "have it pass as binary."The code lineCode: server = b'secrets.myserver'retrieves the string defined by myserver and then converts that to a binary string.If that is your...

View Article
Browsing all 1225 articles
Browse latest View live