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?I have not. I found this didn't work well with the multitouch aspect of the...
View ArticlePython • Send IR Command with Python
Hello everyone guys!! I need your help for a project I'm trying to do, namely: I created a voice assistant in Python so that it recognizes my voice and sends IR commands (I want to control a hifi...
View ArticlePython • Re: Send IR Command with Python
The command I should send was captured with PiIR which works well and which, launched from the terminal, is the following: piir play --gpio 17 --file denon.json play.So I take it that when you run the...
View ArticlePython • Data encoding/decoding with python
Hi!I'm working on a long-distance laser communication project. The principle is simple: a first raspberry pi pico receives text, converts it into binary and flashes a laser, every T seconds. On...
View ArticlePython • Pi 5 uart1 (ttyAMA1) doesn't receive in python but is fine with...
HiI have 4 uart ports on my pi 5, enabled in config.txt:Code: dtoverlay=uart1-pi5dtoverlay=uart2-pi5dtoverlay=uart3-pi5dtoverlay=uart4-pi5With a jumper from pin 12 (uart4 tx) to pin 1 (uart1 rx) I can...
View ArticlePython • Re: Unable to import cv2 on OpenCV installation
cv2 recognition works now on my second machine. I fixed it by combining steps from the above. First, I used a new SD card with raspberrypi os installed. Then, the command that did it for me is:pip3...
View ArticlePython • Windows offline syntax check tool for MicroPython scripts
Is there a stand alone Windows app tool that can check the syntax of a MicroPython script without running it ? I just need to find the syntax errors, not run time errors... For example,...
View ArticlePython • Re: Windows offline syntax check tool for MicroPython scripts
Just install CPython on your Windows System and use it to compile python source code to python bytecode.Code: py -m compileall main.pyIf there is a SyntaxError, you'll get a message about it.In...
View ArticlePython • Re: Pi 5 uart1 (ttyAMA1) doesn't receive in python but is fine with...
Why is minicom fine but python is not?Do you have another script that is writing to the UART?Because in the Python script you have posted you only attempt to READ from the loop-back'ed port: you never...
View ArticlePython • push data to webpage
Ive got a portable Pi measuring temp and humidity that puts the data into a server/webpage which I read on my iPhone.But each time I want the latest reading I have to refresh the webpage on the phone....
View ArticlePython • Re: push data to webpage
Have you tried the simple javascript refresh page after 5 seconds e.g.Code: <script type="text/javascript"> // Reload the page after 5 seconds setTimeout(function () { location.reload(); },...
View ArticlePython • Re: Unable to import cv2 on OpenCV installation
cv2 recognition works now on my second machine. I fixed it by combining steps from the above. First, I used a new SD card with raspberrypi os installed. Then, the command that did it for me is:pip3...
View ArticlePython • Re: Web Scraper
It's great to see your interest in web scraping and data consolidation! Let's break down your questions one by one:Generic Web Scraper for Raspberry Pi 4b – While there isn't a built-in,...
View ArticlePython • Pi 5 uart1 (ttyAMA1) doesn't receive in python but is fine with...
HiI have 4 uart ports on my pi 5, enabled in config.txt:Code: dtoverlay=uart1-pi5dtoverlay=uart2-pi5dtoverlay=uart3-pi5dtoverlay=uart4-pi5With a jumper from pin 12 (uart4 tx) to pin 1 (uart1 rx) I can...
View ArticlePython • Re: Python3 CGI problem
OK , is it 32-bit or 64-bit? How to tell Code: getconf LONG_BITStatistics: Posted by neilgl — Tue Feb 25, 2025 4:05 pm
View ArticlePython • reading a string from serial
Hello,I am a complete beginner to Raspberry Pi and Python. Currently, I am trying to convert the Arduino code that reads the serial string sent from RFID card through serial. The string has 12...
View ArticlePython • Re: reading a string from serial
I am trying to convert the Arduino code that reads the serial string sent from RFID card through serial.Lots of questions even though I haven't worked with RFIDHow do you know the RFID connect to the...
View ArticlePython • Some trouble with pigpio callback
Hi,I have an application that uses the following class:Code: class inout:# #Input Numbers# rc = 16# ro = 17# lc = 6# lo = 19# lid = 20# #output numbers# d1dir = 4# d2dir = 18# d1pul = 12# d2pul = 13...
View ArticlePython • cls alternative
my name is ali and I was making a quiz and I wanted to make it so when a question was answered it deletes all previous outputs this is my codeimport questionsimport sysimport timeimport os#clear...
View ArticlePython • Re: Some trouble with pigpio callback
The callbacks are calling the class and not the instance of the class.Wrong:Code: self.pio.callback(rc,pigpio.EITHER_EDGE,inout.RightAct) self.pio.callback(ro,pigpio.EITHER_EDGE,inout.RightAct)...
View Article