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

Python • Is sdotool still available

I have been using sdotool for a number of years to resize and position a Python window.Unfortunately the memory card in that Pi has now failed and I need to reload my programs onto a new card.However,...

View Article


Python • Re: Is sdotool still available

what kind of PI?what PI OS? (cat /etc/os-releaee)if it is Bookworm, bookworm no longer uses X11 by default, it is using the Wayland compositor.you can switch back to X11 using raspi-config, 6, a6apt...

View Article


Image may be NSFW.
Clik here to view.

Python • Re: Programming in rpi zero w

I mean I am doing it because my school has given me the opportunity to present a working model for a competition. I want to show my interest in space by doing a model of a backup engine of a rocket...

View Article

Python • Re: Ping with python and socket library

Thank you all for the replies guys.I tried what @bensimmo suggested which is to ping the pi itself with the code. Once again it fails. I noticed something. I am currently using the Thonny python IDE....

View Article

Python • picamera2 – most efficient way to continually capture?

Code: Hi all, working on updating some existing code for a car traffic monitor.Setup I'm running is:- pi 3 b +- OS Bookworm 64 bit- python 3.11- virtual env created (with --system-site-packages so...

View Article


Python • Re: picamera2 – most efficient way to continually capture?

virtual env created (with --system-site-packages so that I could access picamera2, since I couldn't install properly in virtual)Not sure this helps but I recently told about creating an VENV. From a...

View Article

Python • PI5 Four PWM R/C Servo working

I figure out how to use the 4 PWM from GPIO.First I did have to enable the PWM in /boot/config.txt and reboot.Code: [all]dtoverlay=pwmTo make thing simpler I create a small python3 script to enable...

View Article

Python • counting the steps of the motor in a certain condition of another...

Hi all,I am trying to count the steps of the stepper motor in a certain weight value that I measure from the balance weight. But the problem is that at first the motor runs and then the balance will...

View Article


Python • Re: counting the steps of the motor in a certain condition of...

Excuse me, but it very difficult (I am afraid it is impossible without ambiguity) to read your code and understand its structure, the way blocks are nested.You really should protect code you show...

View Article


Image may be NSFW.
Clik here to view.

Python • Re: Raspberry Pi 5 - gpiod vs RPi.GPIO

So, I've just come out of the other side of four days trying to get an LED flashing on my new Pi5.Four days ago I booted up my PI headless and connected to it via a remote session from VS Code and put...

View Article

Python • Re: Splitting values after comma and storing in different variables

Maybe use split like thisCode: x='255,255'y=x.split(",")print (y)for z in y: print (z)Succesfully tested (leading and trailing spaces; 0)Code: x='255,255, 0, 155, 0 , 355'y=x.split(",")print (y)for z...

View Article

Python • No Module Named Pydub in Bash

I have a program that uses the pydub library. I want it to run at boot time. I wrote a bash script to run at boot with a line in crontab. I have temporarily commented out the line in crontab to test...

View Article

Python • Re: No Module Named Pydub in Bash

I found the problem. I didn't specify paython3 in the script.Statistics: Posted by wjburl — Wed Jan 10, 2024 7:43 pm

View Article


Python • Connect FPV Flight controller to Raspberry Pi 4

Hi, I am using INAV firmware with Matek H743 Flight controller. I want to connect FC to Raspberry Pi and read data from lidar/optical flow and GPS sensors.Culd you please provide me with documentation...

View Article

Python • Re: Connect FPV Flight controller to Raspberry Pi 4

Hi, I am using INAV firmware with Matek H743 Flight controller. I want to connect FC to Raspberry Pi and read data from lidar/optical flow and GPS sensors.Culd you please provide me with documentation...

View Article


Python • Re: very noisy SoC temperature measurement (RPi5)

I use "vcgencmd measure_temp" for the CPU temp.Code: $ vcgencmd measure_temptemp=47.2'Cand "/sys/class/thermal/cooling_device0/cur_state" for the fan speed.The CPU temp does wander a bit as you say,...

View Article

Image may be NSFW.
Clik here to view.

Python • What's wrong with this code?

I'm using USB UART not the PI's on board Uarthttps://postimg.cc/zbQpDLh5These are the correct numbers from the datasheet I double checked but it seems to pass the CRC check right?Code:...

View Article


Python • Re: What's wrong with the code?

First you need to send a byte string result = ser.write( b"\xff\x01\x86\x00\x00\x00\x00\x00\x79")1 - Put a b before the string 2- Hex byte needs \x not just xStatistics: Posted by danjperron — Thu Jan...

View Article

Python • Re: What's wrong with this code?

Excuse me, but python stops at the fist horror and danjpeperron corrcted the first error you made.from https://pyserial.readthedocs.io/en/late ... l_api.htmlserial py can read UP to size (less or...

View Article

Image may be NSFW.
Clik here to view.

Python • pyinstaller on raspberry pi

Hello,I want to sincerely ask something bothering me...Thanks First,I installed pyintsller on my raspberry pi 4B,but it seems wrong,beacuse i read some post said in pyinstaller package it must...

View Article
Browsing all 1225 articles
Browse latest View live