Questions tagged [python]
Python is a general-purpose, dynamically typed, object-oriented high-level programming language. Interpreters for versions 3.x and 2.x come installed on the Raspberry Pi's most popular operating system distributions.
3,218 questions
1vote
0answers
10views
Detect whether USB speaker is connected to my RPi 4B, in Python
I'm building a device that if in my Python program the USB speakers are not connected it directs sound only to the headphones but the device works differently in a different mode with not so many ...
1vote
0answers
17views
My motor encoder is rotating but on Rviz2, it didn't
I'm working on a custom LIDAR using TF Luna and rotating it using a motor with an encoder for mapping purposes. As the title says, the rotated angle is not being updated to Rviz2 , resulting in a ...
0votes
1answer
29views
Can't bind to AP interface in python when using create_ap
I've written a simple python server for an IoT electronics school project. A "raspberry pi 3 model B rev 1.2" acts as the local station/server. I'm looking to create an AP which esp32's ...
0votes
2answers
40views
How to unbind a GPIO pin
Hi Im working to make a car radio using a RPI5 with this Hat (version carpihat5 pro with dac+) with this project everything goes well but when I tried to add another GPIO pin to turn my amp on to his ...
0votes
0answers
10views
ESP32-S2 XBee Communication Issue - Sending Data But Raspberry Pi Not Receiving
I've set up a Zigbee IoT network using an ESP32-S2 Feather with BME280 as the sensor node and a Raspberry Pi with XBee 3 USB adapter as the coordinator. The ESP32 appears to be successfully sending ...
0votes
1answer
46views
Is this the right approach for my project?
This is my first Raspberry PI project. I'm trying it for fun and personal use for my home. I want to mount a device that detects a face from a short distance (maybe 1m and less) and initialize an API ...
0votes
1answer
68views
- Errno 121 - Remote I/O error when sending data through i2c
I'm trying to send data to the RAM of a I2C LCD screen to clear the display (when I switch on the LCD and just after the init stage, many pixels are randomly initialized to 1 and not 0). I'm using ...
0votes
2answers
42views
Autocorrection of 1 wire system
I have 11 DS18B20 sensors distributed through my house checking temperatures of all rooms, as well as outside temperature. I check and data log from these every 5 minutes and have been doing so for ...
-2votes
1answer
46views
Strange issues with using crontab to run a python script
I'm working on a project that needs to run headless - I need to run a python script "main.py" within a virtual environment at boot. I decided to use crontab to do this. My crontab line is as ...
1vote
0answers
36views
Realtime waveforms on a RasPi5 using python?
Is there a way (over in STM32-land, I would use double-buffered DMA banks) to output waveforms (4 pins in my case, though I'd like to do more) on a Raspberry Pi 5 in a continuous mode that won't go ...
0votes
1answer
47views
Raspberry Pi RFID, PIN & fingerprint project
Hoping someone can help. I am currently doing a school project using a raspberry pi to allow RFID scanning, then a PIN entry then finally a fingerprint scanner, all fetched from an SQLite database. ...
0votes
3answers
45views
Why doesn't python script redirect output to file?
I have a Pi 4 with bookworm, running a python 3 script. The python script generates logging output to stdout (to the terminal) when run from a prompt. I want to run the script from cron and capture ...
1vote
1answer
47views
can write but not read with SMBUS
I'm trying to drive an I2C LCD screen. I know the device address from i2cdetect -y 1 It's 0x3f. I reset the screen by setting LOW and HIGH the RST GPIO 4 (the RST pin is connected to GPIO4). Then I ...
0votes
0answers
79views
Raspberry Pi Pico OLED SSD1306 - No I2C Devices Found & AttributeError
"I'm trying to get my SSD1306 OLED display working with my Raspberry Pi Pico using MicroPython, but I keep running into this error: Traceback (most recent call last): File "<stdin>&...
1vote
0answers
31views
RPI 4 B gpio not working when usb printer is plugged in
I have an RPI 4 model B below is my code import RPi.GPIO as GPIO import time # GPIO pin connected to the COIN pin of the coin selector COIN_PIN = 24 # Setup GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(...