gpio

Writing a python door sensor with telegram bot integration

Writing a python door sensor with telegram bot integration Question: *This is a follow-up question to a previous problem I had writing a similar code, however the telgram-send library that I was using has not been updated since last year and I cannot configure it to make it work with my bot anymore; it gives …

Total answers: 1

Accessing multiple GPIO's from multiple Docker Containers

Accessing multiple GPIO's from multiple Docker Containers Question: I am running into an issue with Docker Containers and RPI4 GPIO. Everything works great if the containers are run by themselves. Ex. Container 1 runs and provides output and then I stop it, then I am able to start Container 2 it provides output and then …

Total answers: 1

stopping a python program at certain time and resuming temporarily with button

stopping a python program at certain time and resuming temporarily with button Question: I have a python program running a clock and thermometer (raspberry pi + fourletterphat), see program below. I change between showing time or temperature by clicking a single button (gpio16). What I need help with: I want to pause the program during …

Total answers: 1

Controlling led strip with SPI bus causes entire strip to light up

Controlling led strip with SPI bus causes entire strip to light up Question: I am using python package to control a led strip. Using PWM everything worked perfectly fine but it didn’t allow me to run the script without sudo which is why I switched over to using SPI. Now I get this weird behaviour …

Total answers: 1

Raspberry Pi DHT 11 sensor not working. I get None None

Raspberry Pi DHT 11 sensor not working. I get None None Question: Have integrated Raspberry pi4 with a DHT sensor. The data pin is connected to pin GPIO 26 Have tried connecting the VCC to both 3.3V and 5V Have tried with both Adafruit_DHT.DHT11 and Adafruit_DHT.DHT22 in the code for the same sensor but I …

Total answers: 2

Call a shell script on a button press & kill it after pressed again

Call a shell script on a button press & kill it after pressed again Question: I can’t seem to figure out how to kill a script in python after it’s called. Any ideas? "Party.py": #!/usr/bin/python import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(11,GPIO.IN, pull_up_down=GPIO.PUD_UP) input = GPIO.input(11) import time import os #initialise a previous input variable prev_input …

Total answers: 1

NameError: name 'true' is not defined

NameError: name 'true' is not defined Question: I want to use Boolean ( true / false ) in my python source file, but after running the application, I receive the following error: NameError: name ‘true’ is not defined The error lies on while true:, when I am trying to make the Raspberry Pi run a …

Total answers: 3