Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rpi.gpio]

rpi.gpio refers to the package name of a Python module for accessing the Raspberry Pi's GPIO pins. The module allows GPIO pins to be initialised, turned on, and turned off. It uses a functional programming style.

0
votes
1answer
16 views

Help needed with GPIO and a remote controlled gate relay switch

I am very confused and hoping someone can point me in the right direction. What I would like to achieve is converting an external relay switch (from a normal everyday gate receiver) into a signal ...
-1
votes
2answers
24 views

How can i Get 5 Volt output with GPIO

I am using Raspberry Pi 3 B+ and I want to run a 5 volt DC motor with RPi.GPIO, I have written a code: import RPi.GPIO as GPIO from pip._vendor.distlib.compat import raw_input u = raw_input('how ...
0
votes
0answers
10 views

Multiple GPIO.add_event_detect callbacks results in incorrect expected output

I am currently working with a differential drive robot which has two wheel encoders connected to GPIO Pins 5 and 23. I managed to obtain velocity information based on the pulse time information ...
0
votes
0answers
7 views

Frequencies available for wavechaining using PIGPIO library

I am working with the PIGPIO library to run stepper motors. I am using wavechains to the STEP pin of the driver. I need help regarding the possible pulse frequencies available for wavechaining. I ...
0
votes
1answer
33 views

Wiring on RPI3 when connecting two peripherals - microcontrollers simultaneously

I am currently having an ADC(MCP3008) connected to a rpi3, using the following wiring map, in order to read data from analog sensors. MCP3008 -> RPI3 VDD -> 3.3V VREF -> 3.3V ...
-4
votes
0answers
33 views

I need help coding a toggle button for led? [duplicate]

I have hooked up my circuit and it works as a hold button to turn light on. Then when I let go of button light turns off but I have found no way to make a toggle button for led. If somebody were so ...
1
vote
0answers
19 views

Raspberry pi 3 - GPIO output stays at 1.8V

I've set-up a GPIO port to output. With an external multi-meter, I've noticed that the potential stays at 1.8V in respect to the ground. I've checked in respect with the same ground, and the 3V3 and ...
0
votes
4answers
446 views

How can I make my LED flashing while executing the rest of the code?

How can I make my LED flashing while executing the rest of the code? I want to make some LEDs flash while my program executes the rest of the code.
1
vote
0answers
36 views

Simple intercom with rPi

I saw someone had a question a couple of years ago about connecting his intercom (which used a phone line) to a rPi and none of the answers were realistic. I also would like to do some simple project ...
1
vote
2answers
47 views

Servo motors not working as expected with Raspberry pi 3

I am developing a robot with raspberry pi model b along with three servo motors. I have two functions which are defined for obtain robot behaviours. In the first function my servos are working well. ...
0
votes
3answers
59 views

Relay board failing when connected to RPi3 5V pins

I'm using my pi to power several relays. A total of ~20 relays (a 8-relay board and three 4-relay boards) I'm also running home-assistant Yesterday i noticed that when i try to power them all up, ...
1
vote
1answer
46 views

same GPIO input signal on multiple raspberri's from one source

Im having 7 raspberri pi's 3 connected to 7 screens, running an python 2.7 app to download different images from google drive, every raspberry has different images. Geeqie is displaying those images ...
0
votes
1answer
22 views

Make Raspberry Pi to work as AP and Station to receive wireless temperature sensor values

Hi after reading the manual of Xbee device, I am able to use XBee device with raspberry pi. But how to make raspberry pi to work as an access point as well as the station at the same time? using ...
2
votes
3answers
72 views

gpiozero Button.when_pressed

I'm learning python and gpio using the examples here: https://gpiozero.readthedocs.io/en/stable/recipes.html I wanted to extend the code to more than one button and pass a parameter to a function (...
1
vote
1answer
64 views

Controlling Raspberry pi3 Wirelessly with HTML (Lighttpd)

I've been working on a Obstacle avoidance robot using Ultrasonic and IR sensors. The scope of my project is to execute my program over the air. Control the robot's movement using mouse or touch ...
0
votes
2answers
20 views

Program not able to open file at start up but when running from command line, runs as expected

using a library from https://github.com/BLavery/LIBtft144 this line of code doesn't seem to run when I run the program from a systemd. I also tried calling it from a crontab call of my .py program. ...
0
votes
0answers
52 views

Python script wait for button press before starting/stopping a separate python script

I've written a python script (shown below) which starts and stops another separate python script (datalogger) once a button is pressed. The datalogger script records logic levels (0 or 1) and stores ...
0
votes
1answer
31 views

How can I attach a BTS7960 43A motor controller circuit and control it from a keyboard wirelessly through the Raspberry pi [closed]

I need to attach a BTS7960 43A motor control circuit to the Raspberry Pi. Could anyone please tell me the connections and provide me with a link to a python code to drive motors forward and reverse ...
0
votes
0answers
37 views

Python script (datalogger) produces different data when run from a separate script (button) to when it is run as itself [duplicate]

I've created a datalogger script that continuously records every rise and fall in a square wave signal (connected to pin 26 on a Pi 3B+) to a CSV file. The data recorded in the CSV is either a 0 or 1, ...
0
votes
1answer
40 views

Raspberry Pi 3 GPIO pins always active

Wiring setup for Rpi: I have an rpi 3, and I've recently started experimenting with the GPIO side of things. I'm new to electronics in general, although I do computer programming regularly. I have a ...
0
votes
1answer
45 views

How to add a fan if no gpio pins available

new to all this but great fun. I have a raspberry pi3 and i did have a fan connected to it. I just added a power supply battery. i also added a IR remote and power button which sits onto of the gpio ...
0
votes
1answer
151 views

How to start and stop python script using button

I've written some python code that should start and stop another python script (Datalogger) when a button is pressed. So when the Pi is booted up I'm wanting the button script to run and then once I ...
1
vote
0answers
81 views

How do I pause a python program and then wait if no signal is received to a GPIO pin?

I'm developing a datalogger using a Raspberry Pi 3B+. I have 2 separate square wave signals connected to two separate GPIO pins and some code to record and store the date and time of each transition ...
0
votes
2answers
37 views

Restore UART pins 8 & 10 after GPIO.cleanup() without reboot

A Raspberry Pi 3B+ is talking to an STM32 chip via UART over pins 8 (TXD) & 10 (RXD). When I take control of those pins using GPIO.setup(8, GPIO.OUTPUT); GPIO.output(8, GPIO.LOW); and later ...
2
votes
2answers
105 views

How to stop python script that was started with crontab reboot

I have a python script that continuously saves data to a CSV file and is started as soon as the Pi starts up using crontab reboot. Does anyone know how I stop the script from within the Raspberry Pi ...
0
votes
1answer
29 views

How do I stop CSV file being overwritten when rebooting Raspberry Pi 3B+

I have some code (shown below) which turns the Raspberry Pi into a datalogger. I use GPIO.add_event_detect to detect the date and time that a square wave signal changes state. This data is then saved ...
0
votes
1answer
540 views

RuntimeError: Failed to add edge detection. GPIO.BOTH Raspberry Pi datalogger

I am coding a datalogger using a Raspberry Pi and am starting to test my code but now keep getting an error saying 'RuntimeError: Failed to add edge detection'. Here is my code: import RPi.GPIO as ...
1
vote
1answer
72 views

Datalogging square wave signal using GPIO.BOTH

I'm currently making a datalogger using a Raspberry Pi which will record the real time and date of each falling and rising edge (GPIO BOTH) of a square wave signal (going through one input port). The ...
-1
votes
1answer
37 views

Modifying input of HID via GPIO of PI (unless there is a better way?)

Basically I want to control the input of a USB HID via one or more other HIDs. I know there are commercial options available to do this however they are closed source and expensive. I'd like to get ...
0
votes
1answer
102 views

How can I control a 12V solenoid door lock - Pi Zero

I have a solenoid door lock that requires 3 different voltages to operate - Unlocked Idle: Requires low voltage (6V) that'll hold the solenoid seated - Locked: No power (0V) - Unlock: 50-100ms ...
1
vote
1answer
98 views

UART RX stops reading data after working correctly

I'm trying to read an continuous stream of data from my device (laser altimeter). The device is connected to the UART Rx pin of raspberry Pi 3B+. Everything works fine with this python code: import ...
0
votes
0answers
26 views

Digital weight scale callibration

I have built a digital scale, similar to the one explained here, using four 50Kg load cells forming the Wheatstone bridge. The following two steps give experiments give me different output which I do ...
1
vote
1answer
21 views

GPIO.input(24) is coming back True when it shouldn't be (false button presses)

I have a button in a working circuit. Within sys/class/gpio/gpio24, value changes properly (it becomes 1 when pressed down, 0 otherwise). When I use GPIO.setup(24, GPIO.IN) within python, GPIO.input(...
0
votes
1answer
37 views

Why Raspbian jessie version 8 won't allow communication through GPIO serial pins?

I am running Raspbian Jessie 8 on Raspberry 3 and I followed the answer to the question Why my program won't communicate through ttyAMA0 on Raspbian(jessie)? But I still can't get my program to ...
2
votes
1answer
53 views

LED not blinking

Raspberry Pi Zero Wireless I have a Pi Zero connected to a breadboard using the GPIO Extension Board and ribbon cable. I have followed several of the basic blinking LED tutorials. One jump cable is ...
1
vote
0answers
212 views

RPi.GPIO - Properly Wiring and Setting Up Pins for Button Inputs

Edit: Breadboard, schematic, and code updated. I accidentally fried my Pi by shorting it out through the GPIO pins, so I figured it would be a good idea to ask for some help before trying my current ...
-1
votes
1answer
35 views

python basic problem in developing raspberry pi 3 GPIO skill

this is a part of a code for picroft skill: def handle_command_intent(self, message): if message.data["command"].upper() == "BLINK": self.speak_dialog("ledblink") the "data" and "...
0
votes
2answers
59 views

Writing to GPS HAT on Raspberry Pi Zero W Never Returns Anything

I have attached a GPS HAT to a Raspberry Pi Zero W running RASPBIAN STRETCH WITH DESKTOP. When I SSH in to run a simple Python script that writes to the HAT serial port, nothing happens and I am not ...
1
vote
0answers
64 views

Problem counting pulses

I want to count pulses and find the frequency. Here is the picture of pulses from the oscilloscope: Obviously, frequency is around 1/2.3 ms = 420 Hz. First I tried this program: import RPi.GPIO as ...
0
votes
2answers
72 views

Raspberry Pi Detects I2C Device Sometimes

I have my MPU-92/65 connected to my Raspberry Pi and it's sometimes detected but not always. $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -...
1
vote
1answer
34 views

Controlling electromagnets in clock display

I have an electromechanical 7-segment clock display with each segment controlled by an electromagnet. A segment is 'on' depending on the polarity of the last pulse to its electromagnet. Can anyone ...
1
vote
1answer
105 views

Use Raspberry Pi GPIO to sync multiple video players. Possible?

Is it possible to use GPIO to sync multiple RasPi video players? As shown in the picture below, I need to sync 16 RasPi video players. The master RasPi will trigger the video players (start, stop, ...
0
votes
0answers
24 views

How to create installer files in Raspberry pi

I have created a program in Raspberry pi and I am running it using the command python myprogram.py . Is it possible to create the installer file of this program? that means after installing this ...
2
votes
2answers
869 views

How fast can GPIO pins toggle?

I'm currently using Python's RPi.GPIO module to toggle some pins, and I want to know how quickly it can do this. I need the pins to be toggled on the schedule of a ~50 mhz FPGA clock, which I'm ...
0
votes
1answer
499 views

ImportError: No module named 'RPi'

I am trying to make a humidity sensor using this code import RPi.GPIO as GPIO import dht11 import time import datetime # initialize GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup()...
0
votes
1answer
409 views

Read GPIO pin on web page

I was able to control an led from a web page using the following code. when I call http://myip/pinon.php it will light up the LED and http://myip/pinoff.php will turn off the LED. pinon.php <?php ...
2
votes
2answers
200 views

Short pulse detection about 35ms, is it possible

I got somewhat short pulse 35ms, I written script in python using RPi.GPIO, using event and callback. Is it possible to detect so short pulses? On related question how close to 3V3 I need to get? I ...
0
votes
1answer
191 views

Get measured value of gpio vibration sensor (SW420)

I've managed to connect 2 SW420 vibration sensors to my rpi3 and can identify a vibration event on callback. However, I'd like to get the measured value (voltage change?) from the sensors, to see ...
1
vote
0answers
37 views

pigpio monitor GPIO not detecting change correctly

I am having trouble detecting a level change on pin 16 (or any other pin). My script is as follows: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO.setup(16, GPIO.IN, ...
0
votes
0answers
134 views

Issue with FC-51 IR sensor

I am developing a robot with raspberry pi. To detect obstacles I am using FC-51 IR sensor. This is my current code. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) ObstaclePin = 18 ...