Stack Exchange Network

Stack Exchange network consists of 175 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
0answers
17 views

Motor-Potientiometer read and write, additional power source

I want to get and set values for a motor potentioneter ALPS RK16812MG from a raspberry pi. I found a similar approach here however, the answers in that forum suggest a different wiring with an ...
1
vote
0answers
16 views

Interrupts with MCP23017 using the mcp23017 dtoverlay

I'm at my wits end with this one. Okay, so we've got an MCP23017 with its INTA wired to the Pi gpio12 (bcm) in /boot/config.txt dtoverlay=mcp23017,addr=0x20,gpiopin=12 so far so good. I'm looking ...
-1
votes
2answers
34 views

Control motors and servos simultaneously (Python)

I have a Raspberry Pi 2B+ and some knowledge of Python. I need to control a DC motor, two servos and a LED simultaneously. The requirements are: Must control two servos, a LED and at least 1 DC ...
1
vote
2answers
22 views

Channeling a single circuit into 6 possible circuits based on gpio pin signal

I basically want a single input relay, with 6 outputs, that switches to any of the 6 outputs based on the gpio signal, if that makes sense. So the gpio signal would send a signal like 1-6 in binary ...
0
votes
0answers
14 views

trying to rotate 28BYJ48 and 2 NEMA17 stepper motors simultaneously but the rpi reboots each time

I am trying to control a 28BYJ48 stepper(Driver ULN2003AN) and 2 stepper motors NEMA17(A4998). I wrote the code using python using PIGPIO but the rpi turns off every time I try to run the code. I ...
1
vote
1answer
45 views

Safe power supply through GPIO pins

I'm designing a HAT and need to supply power to PI zero W and PI 3B+ through the GPIO headers[2&4]. The supply would regulated at 5V 4A (Would be sharing the same power supply with a Thermal ...
0
votes
1answer
33 views

enable software i2c on raspberry pi gpio

I am trying to interface more than one sensor with Raspberry Pi Zero W, which communicate using i2c interface. So far I am able to connect sensor to dedicated i2c and read the data. Want to know ...
0
votes
0answers
30 views

GPIO number vs Pin number. Which to use?

I am writing a code for an ultrasonic distance sensor. The code worked fine when i used the gpio numbering system for the wires connecting to the gpios and sensor. As soon as i connected the sensor to ...
0
votes
1answer
40 views

How can I use the RPI3 to generate a sawtooth with frequency around 20kHz?

I am trying to generate a sawtooth waveform from the GPIO, the frequency is high, 20 Khz. is pigpio library my best option?
1
vote
1answer
85 views

Runtime Warning: This channel is already in use

I am writing a code for Ultrasonic distance sensor. I have wired all the things perfectly and written the code for it but somehow it gives a runtime error of the channel already being in use. Below is ...
0
votes
0answers
47 views

Multiple raspberry pi's 3 synchronized image navigation

We have 7 raspberry pi's 3, each connected to the internet and an display. On each screen / raspberry pi is geeqie (image viewer_ running with an image slideshow. The goal is to have all raspberry pi'...
0
votes
0answers
27 views

raspberry pi and ltc 2873 cufd (RS 232 and RS 485)

I have a raspberry pi compute module 3 on an I/O board in which gpio 12 is contolling the mode in ltc 2873. If it is ground it will be working in the RS 232 mode. so if I have to write something into ...
0
votes
1answer
29 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
3answers
52 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
29 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
10 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
37 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 ...
1
vote
0answers
31 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
457 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
185 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
91 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
61 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
82 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
33 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
196 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
105 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
25 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
92 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
60 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
79 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
49 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
648 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
128 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
57 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
365 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
32 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
660 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
89 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
51 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
181 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
306 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 ...
1
vote
1answer
25 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
46 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
92 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
399 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
40 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
68 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
96 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
116 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: -- -- -- -- -- -- -- -- -...