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.

1
vote
1answer
109 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
1k 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
72 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
69 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
564 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
321 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 ...
0
votes
2answers
51 views

Using Pi to control a button on a HDMI switcher

I've been reading about how to use the GPIO to toggle a button on a thing I've taken apart. It's like this: Amazon I watched a video of a guy using an opto-coupler, what are the basics here? I'm ...
1
vote
1answer
56 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
58 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
59 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
65 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
38 views

Multi-Joystick (Joystick, rotary Encoder, push Button) to GPIOs

I'm trying to connect a Joystick/Encoder/Button (Copal Electronics CJ25) to a Raspberry PI. Using gpiotest I managed to get it up and running pretty well - using 3.3V input (though the data sheet ...
1
vote
1answer
78 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
78 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
444 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, ...
1
vote
1answer
85 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
82 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
638 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
105 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
2answers
34 views

Voltage dropped significantly on GPIO 4 with a relay coil

I have a Raspberry PI 3 B+, and when I activate the GPIO 4 as output and checking agains a multimeter I get its 3.3V as expected. If I connect the GPIO4 to one end of a coil (http://www....
1
vote
1answer
43 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
74 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
80 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
0answers
19 views

How to get LDR sensor reading in C language [closed]

I am currently working on a project using laser module, a capacitor and an LDR. After looking online, I found a library in Python called GPIOZero that allows me to do this directly, as follows: from ...
0
votes
1answer
217 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 ...
0
votes
0answers
26 views

How does the linux kernel handle interrupts [closed]

A few days ago I asked a question that had (probably) had to do with en interrupt being fired by an ENC28J60 chip (SPI) and messing with the UART buffer. See here. I found a software fix for this ...
1
vote
1answer
211 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
103 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
38 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
32 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 ...
0
votes
1answer
29 views

False Contact Closures - Do I Need Physical Pull Up Resistors to Resolve?

I'm running Raspbian Jessie 4.9.35-v7+ on a Pi 3 Model B. I cobbled together a basic python script to monitor a GPIO pin and send a network signal to a remote application, made two copies of the ...
0
votes
1answer
29 views

Raspberry pi and microbit working together

Can I do a pin out from raspberry pi onto a breadboard and have a microbit setup to receive that pin out and have the microbit run a command on pin in? Or can I have the raspberry pi send a signal to ...
1
vote
2answers
102 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
128 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
94 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
97 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
96 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
29 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
131 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
19 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
105 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
146 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
194 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
116 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
342 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
0answers
13 views

Reading Bytestream from GPIO / External Interrupt and CLK

So I have an external device which bangs out a byte stream (DOUT), it indicates the upcoming stream on an DRDY. The timings are given on an DCLK line. These three lines (DRDY, DCLK, DOUT) serve the ...
0
votes
1answer
273 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) ...