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

Image may be NSFW.
Clik here to view.

Python • RRDtool & python3 code optimization

Hello. The situation is as follows...I use rrdtool to plot the outside and inside temperature graphs, the data of which is kept in a mysql database.rrdtool update file is this: Code: #!/bin/bashcd...

View Article


Python • Re: RRDtool & python3 code optimization

This code gets hometemp and temp in one python script. twotemps.py: Code: #!/usr/bin/python3import mysql.connectormydb = mysql.connector.connect( host="localhost", database="exampledb", user="pi",...

View Article


Python • How much can I ask a Raspberry pi4b to do?

I would like to run distance measurement via hc-sr04 or laser vl53l1x, 2 motors via l298n, pi2 Camera, 3 to 6 servos, face recognition, speech to text, text to speech, object recognition, a robot arm...

View Article

Python • Re: How much can I ask a Raspberry pi4b to do?

Depends how fast you want to do those things - what are you aiming for?Statistics: Posted by neilgl — Sat Aug 10, 2024 2:11 pm

View Article

Python • In search of...

Hi,I am playing around with trying to implement a simple home control widget using a Pico W. I have become familiar with using Django and MVC structured web work.Two things. First, all the examples of...

View Article


Python • Re: In search of...

Hi,I am playing around with trying to implement a simple home control widget using a Pico W. I have become familiar with using Django and MVC structured web work.Two things. First, all the examples of...

View Article

Python • Raspberry pi pico w - micropython - capture PWM parameters

Hello,I am having pi pico w. I generating PWM signal on one GPIO and I am trying to capture its parameters on another GPIO via PIO and micropython. The issue that I have is that I get only zeroes for...

View Article

Python • picamera2 prevent user from closing preview window

Hello.I'm building a Python app that involves displaying a preview window. However, I don't want the user to be able to close the preview window; rather, I want to close it programmatically. I know...

View Article


Python • Pi 4b and 2004a display

I would like a how to display cpu temp,usage,I/p address,free disk space is this possible?Statistics: Posted by Dop — Thu Aug 15, 2024 2:16 am

View Article


Python • Re: Pi 4b and 2004a display

What software are you currently using to drive that LCD Display module?Is the module connected via I2C?Getting the temperature etc. is simple in python.Statistics: Posted by neilgl — Thu Aug 15, 2024...

View Article

Python • Re: picamera2 prevent user from closing preview window

Code: from tkinter import Tk, Buttonroot = Tk()Button(root, text="Exit", command=root.destroy).pack()root.protocol("WM_DELETE_WINDOW", lambda: print("Use of X is not allowed"))root.mainloop()Source:...

View Article

Python • Re: Simple stepper motor driver with acceleration setting for Rpi5

Can you give same code for gipozero library? Sorry here with ACCELCode: import gpiodimport timeimport math# Define your GPIO pinsstep_pin = 24dir_pin = 23# Use gpiochip4chip_name = 'gpiochip4'try: #...

View Article

Python • Button to restart Pi, button to restart program

I have come a little way since my first post. Learned more about hardware, and took a beginner python course. My current program is to monitor with temperature sensors, when too hot turn off the 5v...

View Article


Python • Re: Button to restart Pi, button to restart program

For restarting the script, you could try something like this:Code: from gpiozero import Buttonimport subprocessfrom signal import pauseimport sysdef restart_program(): try: subprocess.run(['python',...

View Article

Python • UDP sendto blocks code execution when the interface is down

HelloI have a situation where I sometimes want to send data between two Pis via ethernet, but sometimes the receiving Pi might not be on. The sending Pi therefore has no connection on the ethernet...

View Article


Python • PYQT6 on RPi-4 Bookworm

Hello, I found tutorial how to install PYQT6 on RPi-5 (link below) and I am trying get it on RPI-4 without succes so far. OS: Raspbian Bookworm 64bit.https://www.linkedin.com/pulse/install- ......

View Article

Python • Re: PYQT6 on RPi-4 Bookworm

Maybe install cmake with Code: sudo apt install -y cmakeStatistics: Posted by neilgl — Mon Aug 19, 2024 9:46 am

View Article


Python • Re: Python script not running on startup

output of systemctl status pi_stats.service gives me this:● pi_stats.service - Pi Stats Script Loaded: loaded (/etc/systemd/system/pi_stats.service; enabled; vendor preset: enabled) Active: failed...

View Article

Python • Re: Pi 4b and 2004a display

PythonI2c tools installedStatistics: Posted by Dop — Mon Aug 19, 2024 11:04 pm

View Article

Python • Re: Running PyAudio Script On Startup Issue

If by headless you mean without GPIO pins, then my Pi is NOT headless. It has GPIO pins and a HAT beneath it.No. By headless I mean without monitor (and keyboard, and mouse).No, my pi isn't headless....

View Article
Browsing all 1225 articles
Browse latest View live