Quantcast
Browsing all 1234 articles
Browse latest View live

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 Article


Image may be NSFW.
Clik here to view.

Python • 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 Article


Python • 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 Article

Python • 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 Article

Python • 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 Article


Python • 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 Article

Python • 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 Article

Python • 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 Article


Python • 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 Article


Image may be NSFW.
Clik here to view.

Python • 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 Article

Python • 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 Article

Python • 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 Article

Python • 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 Article


Python • 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 Article

Python • 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 Article


Python • 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 Article

Python • 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 Article


Python • 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 Article

Python • 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 Article

Python • 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
Browsing all 1234 articles
Browse latest View live