Questions tagged [gpio]

GPIO stands for General Purpose Input Output and can be used to receive and send digital signals to and from simple electronics from the Raspberry Pi.

Filter by
Sorted by
Tagged with
1
vote
1answer
121 views

Using GPIOs as Chip Selects on Raspberry pi 3 while using Windows IoT core

I need to control 5 SPI devices using Raspberry Pi 3 and Windows 10 IoT core. But, as we know, there are only 2 SPI Chip Selects available. Is there any way that I can use the GPIO of the Raspberry Pi ...
3
votes
2answers
2k views

How can I control the PWM via the sysfs

I want to set the PWM for some tests with a tricolored LED. I want to be able to set it up via the sysfs interfaces but I'm having a very hard time finding any information on how to do this. What is ...
0
votes
1answer
78 views

GPIO pins mind bogling error

Raspberry pi 3 b+ I'm trying to make an Obstacle avoidance obstacles. It's a very simple project. I tried with one ultra sonic sensor, it worked. Gave me the distance which i could further ...
0
votes
1answer
79 views

Pi Zero Gpio Extender Reset

I currently have a project I'm working on using a Raspberry Pi, connected via I2C to a GPIO extender (MCP23017), which is using a Transistor (TIP120) to control a Solenoid Valve and a DC Motor in ...
1
vote
1answer
584 views

RPi 3 3.3v GPIO normal current [duplicate]

so I've read around forums that the max current from a RPi 3.3v GPIO pin is 50 mA, but since it is the max I don't know if I should take a resistor for 50 mA or for a lower current.
0
votes
1answer
448 views

Hardwarw PWM via GPIO zero

I heve problem. I don't know if GPIO zero supports hardware PWM. Does it? Where can i change software PWM to hardware PWM? I know rpiGPIO can use hardware PWN for sure but I'd like to continue use ...
1
vote
1answer
57 views

Power supply issues - reboots continuously but GPIO power working

My Raspberry Pi 2 was working with OpenELEC os properly. Suddenly it had stopped working. I don't know whether it had updated anything automatically. It is continuously rebooting. I could see the ...
2
votes
1answer
62 views

fork() Process Issue on Channel Switching via Rotary Encoder

I have KY040 rotary switcher(encoder) as shown below picture. It is the scenario that there are 5 radio stations(simple html url) in urls.txt which are read into stations list in radyoCS.py, at every ...
1
vote
1answer
64 views

Incorrect TTYS0 input from sensor

I am trying to read data from a LV-MaxSonar-EZ0's TX pin connected to the RX pin on a Raspberry Pi Zero W. The problem I'm running into is that the data I'm getting does not fit what the sensor's ...
2
votes
1answer
67 views

Problems with my DIY floater

I've created a sort of sensor to detect whether the water level in my aquarium is too high or too low. Hardware part: See this schematic for how it works: So the red part floats on top of the ...
0
votes
1answer
67 views

Different modules

What are the things to be considered when connecting 3-4 different modules to raspberry pi3? Ex: i am using 4 modules namely RFID reader, hall effect sensor, gps and some push buttons. Need to ...
1
vote
1answer
85 views

Multiple Raspberry Pi zeros (no wifi) + touchscreen. Daisy-chained communication?

I'm trying to devise a solution that will connect multiple Raspberry Pi zeros together for communication between them. I'm using a touchscreen on each of them, so GPIO pins 1-24 are taken. Also, I'm ...
2
votes
1answer
79 views

Javascript pm2 fails to persist my scripts at RPI boot time

I do this to make my scripts run on Raspbian start: sudo pm2 startup ubuntu sudo pm2 start my_script.js sudo pm2 start another_script.js Yet, RPi starts without them, what can be wrong?
-1
votes
3answers
2k views

Boosting FM range transmission from Raspberry Pi

I want to boost FM transmission range when using Raspberry Pi as transmitter. I found this circle: Source: https://www.safaribooksonline.com/library/view/ipod-and-itunes/0596007787/ch01s07.html Will ...
0
votes
1answer
639 views

Waveshare GSM/GPRS/GNSS HAT not connecting to Cellular network

I have this HAT i bought for a pi project I am working on. I get the device to power on, I can connect via USB from PC, and can connect from pi too. However, the NET LED just blinks every second, ...
2
votes
1answer
87 views

Windows 10 core with Raspberry Pi

I amusing C# UWP and i am storing sensor data to a database. What I would like to do is send the Sensor name instead of the GPIO Number. So on pin_valuechanged() I like to assign the pinNumber a ...
1
vote
1answer
93 views

RaspberryPi 2 GPIO stopped working

I have RaspberryPI with Arch Linux and everything was going well, until this morning when I tried to do my usual work on it, it sounds like nothing happening at all, I have checked with pintest (I use ...
2
votes
1answer
710 views

Accessing pwm module without root permissions

I am trying to use the hardware PWM module on my pi 3 by writing to the /sys/class/pwm/pwmchip0 directory (which I think is just a symbolic link to sys/devices/platform/soc/3f20c000.pwm/pwm/pwmchip0). ...
0
votes
1answer
128 views

Raspberry PI SPI interface

I'm looking at a Raspberry Pi and I am a bit new to Serial Peripheral Interface. I see the Rasperry Pi has two SPI interfaces on the GPIO pins. Can one SPI interface be programmed to connect to ...
1
vote
1answer
91 views

Why is pigpio library not moving my servo when the same pin number works perfectly with RPi.GPIO?

I am working on a self driving rc car project and I need a servo to steer my car. As I was getting a bit jitter with RPi.GPIO I tried pigpio library. I am using a Raspbery Pi Model B. But it won't ...
1
vote
1answer
86 views

How can I connect an EasyADC board mikroe340?

I've got a 4-channel 12-bit ADC "Mikroe340" from Mikroelektronika (datasheet). I'm wondering how to wire it with GPIO.
1
vote
1answer
98 views

How to cut the power on power pin 1 programmatically?

Is there a way to cut the power on power pin 1 on Raspberry Pi 3B+, using a command or force this on reboot?
0
votes
1answer
273 views

Change GPIO pins for official Raspberry Pi 7" touchscreen

I need to use different GPIO pins with the Raspberry Pi official 7" touchscreen. I'm already using pins 3, 4, 5 and 6 with a hat, and it would be a pain to change them. I've looked through several ...
1
vote
1answer
297 views

Connecting Hifiberry Digi+ clone (PiFi Digi+ V1.0) to an Raspberry Pi 1 B (26Pin Header)

Hi I wanted to make use of an older Raspberry Pi and build an Volumio Music Player. I ordered Hifiberry Digi+ clone (PiFi Digi+ V1.0), unfortunately I forgot I own an older Raspberry Pi 1 B with the ...
0
votes
1answer
112 views

Problem with LED blink program on Pi

I am completely new to RPi and stuck unexpectedly. I am trying to create a simple python program to make my LED blink. Here are the two programs which are giving same outputs on terminal when I ...
1
vote
0answers
57 views

Getting button click type

I've been looking for a while to how to get the kind of click of a button on GPIO. Is it a single click? Double? Triple or more? Is it a long click? a very long click? a combination of them? I haven'...
0
votes
1answer
53 views

Is it possible to toggle 3.3V and 5V header pins on and off? [duplicate]

Header Pins 1, 2, 4, 17 are labled 3V3 and 5V on the schematics but the connections to the BCM and/or regulators are not in their documents. It appears the 5V node is coming from the raw USB/external ...
1
vote
2answers
123 views

How can I drive output voltage between 0v, +12v and -12v on a single line?

I have an appliance that needs a +12v pulse to be activated and a -12v pulse to be deactivated on the same input pin. After the pulse, the line should drop to 0v again. This voltage switching only has ...
0
votes
1answer
177 views

Can I connect GPIO pin and ground to a PC motherboard power switch to turn it on/off

I would like to use RPi to connect a jumper cable from PC Motherboard power switch to a GPIO pin and Ground to be able to turn the PC On/Off automatically and remotely. Would it work and is it safe?
4
votes
2answers
15k views

How to trigger GPIO event using an active infrared sensor

Trying to get an active infrared sensor to trigger an event on a GPIO pin. I'm using python and the RPi.GPIO library on an RPi model B. Some background info, not sure how relevant it is, but I'm a ...
1
vote
2answers
135 views

Multiple RPi and multiple external 5V power sources. Connecting all GNDs = ok?

First off, I'm a noob when it comes to hardware/electronics. Barely started and not planning on getting too deep in it. I have a bit complex setup that boils down to multiple RPis (around 13, with ...
2
votes
1answer
103 views

Vibration-induced power loss problem

I am a pilot using a Pi 3 as an ADS-B receiver for a gyroplane. It works really well provided I don't try to have the Pi mounted to the aircraft anywhere. As soon as I do, the vibration seems to cause ...
0
votes
1answer
102 views

GPIO button to complete input prompt

I would like to prompt the user for input, then with the push of a GPIO button, submit the input value. This is tricky since the GPIO button polling is typically done in a loop. I was thinking that ...
1
vote
2answers
49 views

Can't exit my apllication in a clean way

Not sure if my problem is related to RaspberryPi, GPIO or just my understanding of Python but since I'm detecting my problem while playing with a button attached to my PI I ask it here. I have a ...
0
votes
1answer
145 views

Using I2C and the adapters

I am trying to use the GPIO pins for I2C communication between the master and the slaves and have been using this page as a reference for me on how to do it. The code is run from userspace daemon. So ...
1
vote
1answer
26 views

How to control computer fans with GPIO

I want to build a smart air conditioner with my Raspberry Pi 3b+ by using these PC Fans: https://www.amazon.de/Arctic-F12-PWM-PST-Geh%C3%A4usel%C3%BCfter/dp/B00NTUJTAK/ref=cm_wl_huc_item. What is ...
0
votes
1answer
116 views

Rasberry Pi LED GPIO using Python

In my project I invoke a python script via node.js on my Rapberrypi B+ model and what the python script does is that it turns on the BCM GPIO ports as per the python arguments passed through the ...
0
votes
1answer
178 views

How to get gpio status on an output pin in ruby

I'm using the Pi to control some decorative lights. I turn the lights on and off via cron scripts and would like to get status on the lights as well. When I run the code below, it reports 'on' if ...
1
vote
1answer
271 views

Pi 3 reboots when GPIO 13 is given 3V

simulate this circuit – Schematic created using CircuitLab I am taking the 3V from Pi and giving it to COM of a relay. The NO goes to GPIO 13 of the same Pi. I have a 120V line that triggers ...
0
votes
1answer
122 views

generated pulse with delay time before it generated

I want to generate about 16 square wave with delay time initial as the following figure .It mean each pulse generated must delay with a value of delay time before it generated with frequency about ...
3
votes
1answer
462 views

How long to wait after shutdown to cut power

I am working a problem that seems to be fairly popular with the Raspberry Pi community. In essence, I am designing a circuit that will utilize a DS3231, a 555 timer, and a load switch to cut power ...
0
votes
1answer
304 views

Voltage High, low with 0 and 1 using python on a GPIO

Mind the variable creations as they are handled. My questions are the following. 1) Why do we have 2 whiles here? Does the sleep at the end of the first part does really anything significant? 2) ...
3
votes
1answer
173 views

Reactive Programming

The examples I see for the GPIO input are based on a loop which waits and check if the GPIO is receiving any info. Is there a way of just detecting when a button was pressed without using a loop under ...
0
votes
2answers
133 views

Can't turn on LEDs through terminal with PWM

I wrote a crappy Python script that should turn on LEDs connected to the GPIO interface. import RPi.GPIO as GPIO import time, sys, json GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) gpioPorts = [...
2
votes
1answer
129 views

Export GPIO pins from extender

I have PCF8574 GPIO extender connected to RPi. I use GPIO Sysfs. It is possible to write/read to/from extender pins, using command like this: gpio -x pcf8574:352:32 read 358 But i can not export ...
1
vote
1answer
245 views

GPIO Input Not Detected Within While Loop

Hi I'm having a problem with trying to detect GPIO input on a PIN within a while loop. Turnstile B Entry button is what I am troubleshooting the statement if tsB_entry_button == False: import RPi....
2
votes
1answer
79 views

outb() equivalent in Python for GPIO

I am a very beginner on programming and raspberry usage, tho I think I learn fast. I am trying to convert an old program (not mine) that was written for Linux on C++ for communication with a printer ...
3
votes
2answers
124 views

Run the program in the laptop and use the raspberry gpios

I'm working with face tracking and I want to activate some servomotors depending the motion of my face. For facetracking I'm using, an usb cam, opencv and dlib. Now results the raspberry can't run my ...
7
votes
3answers
19k views

Setting GPIO value on boot

I'm a semi-linux newcomer and i have a question: I need to set some GPIO pins in this way: (pin 18 out, pin 17 in) (actually i'm doing this via WiringPi(pyton) trought this commands) gpio export 18 ...
0
votes
1answer
36 views

Wireless doorbell using gpiod

Good Morning, I have a non issue that I am just curious how its working. So I have a wireless doorbell that I built. It works using the gpiod and remote gpio. So I have a chime unit that I built with ...