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,213 questions
0
votes
1
answer
99
views
Why nRF24L01 PA is not working on Raspberry Pi 4b?
I have two RPi 4b boards and two nRF24L01 PA modules. The goal is to use both RPi 4b boards and transceivers (both send and receive data).
Note 1: I am using 64-bit OS on RPi 4b. For more details, ...
0
votes
0
answers
33
views
Are there any downsides to generating PWM on RPi 5 this way (using sudo tee)?
Following some initial one-time device-tree setup, the script below seems to do what I need, which is a python-controllable PWM signal at fixed frequency and slowly varying duty cycle (update a few ...
0
votes
0
answers
114
views
How to control a stepper motor using Python?
I am currently trying to control a NEMA 17 stepper motor rated for 1.5A through a DRV8825 driver using a Raspberry Pi 4B for a school project. I was trying to use RPi.GPIO to control the motor but it ...
0
votes
0
answers
149
views
Raspberry Pi OS Lite Bookworm 64-Bit w/DSI Display
I run an open source project called PiFire which aims to provide an open source smoker controller using a Raspberry Pi and some off the shelf hardware.
I have used a DSI connected touch screen display ...
-1
votes
1
answer
133
views
Use RM3100 with Raspberry PI
for a school project, I would like to take measurements of the Earth’s magnetic field using an RM3100 Breakout Board magnetometer from PNI Sensor. I soldered the headers myself onto the pads. I ...
0
votes
0
answers
87
views
NRF24L01 communication between Raspberry Pi 4 and Raspberry Pi Pico (MicroPython) not working
I’m trying to set up wireless communication using two NRF24L01 modules. I’m using a Raspberry Pi 4 Model B as the receiver using the pyRF24 Library and a Raspberry Pi Pico with MicroPython as the ...
0
votes
0
answers
59
views
USB 4G Dongle disconnect with code
Using the command lsusb i am getting the following output:
pi@raspberrypi:~ $ lsusb
Bus 001 Device 005: ID 19d2:1405 ZTE WCDMA Technologies MSM ZTE Mobile Broadband
Bus 001 Device 002: ID 1a40:0101 ...
0
votes
0
answers
78
views
Installing Mojo fails on 64Bit Bookworm
I've being trying to install Mojo a replacement for Python using the instructions here. All goes well until I try to run mojo when it crashes immediately with
2343 external/tcmalloc+/tcmalloc/system-...
0
votes
0
answers
79
views
Well written soft doesnt work after update
I wrote code for my RPi as below and it was working preatty long time, unfortunatelly after system update buttons Start and Stop does not generate any reaction. What may be the reason and how to fix ...
-1
votes
1
answer
756
views
Unable to start pigpio daemon on Raspberry Pi 5 after successful installation
I'm trying to set up pigpio on my Raspberry Pi 5 (aarch64 architecture running 64-bit Raspberry Pi OS Lite). The installation appears successful, but I can't connect to the daemon from Python.
...
-1
votes
1
answer
440
views
How to read from dht11 on rapberry pi 5
I'm using a raspberry pi 5 to read from a dht11 sensor with the signal line connected to gpio pin 26. I tried using the Adafruit_DHT and adafruit_dht libraries, which led to the error messages "...
-1
votes
1
answer
234
views
Install Opencv on Raspberrypi
I am trying to install opencv on my raspberry pi 5 (os: 32-bit lite).
I've tried the code to install opencv:
sudo apt-get install python3-opencv -y
but encounter the error below:
The following ...
0
votes
0
answers
76
views
PanTiltHat and i2c failing
I have a PanTilt Hat powered by two servos over i2c. The example code below works fine and the hat mechanism will move smoothly for many minutes until ended by being terminated using Ctrl-C from the ...
2
votes
1
answer
163
views
Unexpected characters at serial port opening (Arduino Mega to Raspberry Pi via TTL-232R)
I'm using an Arduino Mega to send data via serial communication to a Raspberry Pi 5. The connection is made through a TTL-232R cable (TTL serial on the Arduino side, USB on the Raspberry Pi side). On ...
2
votes
0
answers
84
views
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 ...