Questions tagged [raspberry-pi]
The Raspberry Pi is a low cost, credit card sized, ARMv6 instruction set based PC device developed by the Raspberry Pi foundation.
77 questions
7votes
3answers
1kviews
C++ code reading from a text file, storing value in int, and outputting properly rounded float
Late important updates (unified) I found, that on my Pi's Debian 12 Bookworm (arm64), there is just an older g++-12 available. ...
3votes
1answer
313views
Python script that starts a video recording on a Raspberry Pi using a USB webcam
I’d love some critique, pointers or any improvement to my code. My project was mainly to record a video, through a Flask Application (online), then save it and display it on the Flask Application. ...
5votes
2answers
730views
Stopwatch program written in C, using Pico W
I've a raspberry Pico W and developed a simple stopwatch program in C. I configured GPIO pin 15 as an input and enabled the internal pull-up resistor. If the state is high, I will start the timer and ...
3votes
1answer
113views
Raspberry Pi/PySimpleGUI based resistance test system
Hardware: Raspberry Pi 3B+, Elecrow touchscreen, DFR0660 Barcode Scanner, ADS1115 ADC I would like any bad practices/possible failure points pointed out specifically in the ...
1vote
1answer
114views
bash loop for checking service and network connection
I want to start omxplayer, check if there is the process is up, check if there is internet connection start with play a streaming, if there is not play a local loop, meanwhile try to check if the ...
4votes
3answers
492views
Loop to print changes in irrigation state to turn on and off a pump when water is low
Python Noob building an automation irrigation system in Python for Raspberry Pi. Python has two functions in the most basic use case: on/off the LED (which will in future be a relay->pump) and ...
6votes
1answer
282views
Python script which sends telegram message if Raspberry Pi's temperature crosses 60 °C
I need to know if there is any way I can optimize my code so that it does not use 0.6% of my total memory - which is approx. 22.4MB. This is a really small script that runs for as long as the ...
8votes
2answers
263views
Car computer in Python / GPS tracking VERSION 2
This is an updated question with new code, taking into account your comments from last time: Car computer in python / GPS tracking I have an old car that I use for long distance driving and have coded ...
16votes
2answers
2kviews
Car computer in python / GPS tracking
I have an old car that I use for long distance driving and have coded an onboard computer based on a Raspberry Pi 3 and a few other modules. It's my first project in Python and while I've already ...
1vote
2answers
176views
Error handling on temperature sensor
I built an allsky camera with a temperature sensor and a heater. The heater is supposed to turn when the sensor (measure_temp()) return a temperature below 8, which ...
2votes
1answer
93views
d20pfsrd Discord Bot Scraper Abstraction and Deployment
I wrote a discord bot that listens for links to the d20pfsrd rulebook in discord chat, checks if they are feats or magic, and then scrapes the page, formats it, and spits it back into chat as ...
5votes
2answers
1kviews
A PHP script used on my home server to download YouTube videos
I have a PHP page I used to download YouTube videos, hosted on my Pi 4. The site is only going to be used on my home network (so a dot local address), but it allows me to download videos on my phone ...
3votes
3answers
76views
Raspberry PI switching from Soft Access Point to WIFI client
I am relatively new to C language and Linux systems I would like some feedback/review. The main function of the code is to read the dhcpcd file looking for the 3 lines and then either adding/removing ...
2votes
1answer
3kviews
Snake Game for Raspberry Pi Sense HAT written in Python
Goals learn Python improve problem-solving skills improve my coding style Hardware This code runs on a Raspberry Pi 3 Model B (Raspbian OS) in combination with the Sense HAT. The 8x8 LED-Matrix on ...
14votes
2answers
3kviews
Sort-of Alexa clone using Python on a Raspberry Pi
It's still a working process. There are still things I would like to add, and if you have any critiques or ideas they would be greatly appreciated! I would like to know if my code is readable. ...