The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
3
votes
2answers
399 views

Using Transistors and the GPIO, can someone please check my math?

I've done a couple of new schematics, this is my first time doing this, I was wondering if somebody could double check my math? Powering the RGB LED straight off the GPIO pins: Using the 5V rail and ...
1
vote
1answer
32 views

Run a code without being on the physical machine

I have some devices (i.e. leds) that I need to control on a Raspberry Pi, but I was thinking if there is a way in which I can put the code in a server, and then when the raspberry Pi receives a ...
5
votes
1answer
3k views

Reading HC-SR04 echo with wiringPiISR()

The following code works with the busy wait, but if I replace the while loop with a call to wiringPiISR() it always returns 0 for the distance. I also tried calling wiringPiISR() before raising the ...
0
votes
3answers
71 views

Controlling a led button and receiving input from that button

Ok, I have a button with a small 24v Led inside. My goal is to control the light depending on the state of the button. Quick press: toggle start/pause --> light on/off Long press (1500ms) --> reset -...
0
votes
1answer
591 views

Raspberry Pi - Press for on / Press for off switch

I've begun tinkering with using electronics and am also new to using Python. I was wondering if someone could help me please? What I'm trying to achieve is to use an on/off switch to run a motor - ...
1
vote
1answer
63 views

GPIO PWM. ESCs still run different after calibration

I’m putting a quadcopter together. I’m using a python script to calibrate the ESCs... they beep like a blinking led when I give them power. Then I run the calibrate script and they give me the proper ...
0
votes
1answer
116 views

How to hook up multiple devices with sda pins?

I am building something with raspberry pi. I am using the 16x32 led matrix as well as the port expander (MCP23017). Both use the SDA and SCL pins. I am having trouble hooking it up. I realize this may ...
0
votes
1answer
499 views

Use Adafruit Motor HAT and GPIO

How can I use the Adafruit Motor HAT and RPI GPIO at the same time? I just need an extra tall stacking header, or there is something I missing? My goal is use the Motor HAT and some LED and HC-SR04 ...
0
votes
1answer
164 views

Raspberry pi 3B+ won't boot, solid red light

My Pi won't boot, I was coding my Pi when my friend came and wanted to see a movie from the Pi, I shut it down normally and close the power supply, then changed the SD card that had kodi on and tried ...
2
votes
1answer
2k views

GPIO doesn't work, error: “Error when trying to open pin 11”

I connected a LED to pin 11 as per this guide. And this works in the terminal to turn it on and off: gpio mode 0 out gpio write 0 1 gpio write 0 0 But when I try to use pi-gpio, with this code as ...
0
votes
1answer
219 views

Accessing RJ45 pins individually from Raspberry

I bought a small optical monitor sensor. It basically detects optical pulses from an electrical meter and then triggers an ISR on a datalogger, which is a concrete product for this purpose. Because of ...
2
votes
1answer
470 views

sh: can't access tty; job control turned off

Yesterday, I was programming GPIO controls for a robot in class and left for a few minutes to work with another group. I came back to find all the GPIO disconnected and sh: can't access tty; job ...
0
votes
1answer
86 views

I can't change pin value

I've been with my new Raspberry for a month and it worked perfectly but today the pins have stopped working. I have tried many ways to put them with value 1 but for more I try not change them from 0. ...
0
votes
2answers
498 views

Pi for control 20 analog outputs

We need 20 analog outputs with adjustable voltage (0-20 volts), frequency (0-150 Hz), as well as adjustable maximum current, and also the ability to measure current, frequency and voltage. How can ...
0
votes
1answer
31 views

Pigpio on callback get value

I currently have some code that I found that constantly outputs a value from a digital caliper. However, I want to modify this so that it is inside a function that can return that is returned from ...
0
votes
0answers
28 views

HC-SR04 Ultrasonic Rangefinder readings are way off

So im trying to make my Robot move by itself and then make a turn until the path is clear using the HC-SR04 Ultrasonic Rangefinder, but my problem is that my readings are off with a large margin, ...
0
votes
1answer
48 views

How can we allow OS to control backlight via a GPIO as PWM

I want to make OS control backlight, that is, use a slider in some DE like lxde or kde. How can I make kernel aware that, to control backlight only thing it needs to do is, produce a PWM signal with ...
1
vote
3answers
2k views

Alternatives to LIRC for transmitting IR codes

Alright, I've managed to get LIRC to work on a Pi 3, but not on a zero w running raspbian lite. I have the infrared codes I want to send (e.g 0x40BF or 0x8877) and I'm wondering if there's another ...
0
votes
1answer
486 views

Listen for certain keyboard input and insert to SQL Server DB

I have a USB NFC reader (acts as an emulated keyboard that types out the 10 digit ID number on the card when scanned). I want an app to listen for this input and when it sees 10 digits, I want it to ...
1
vote
1answer
47 views

Does a battery pack exists which does not need the microUsb power connection? [closed]

I'm building a small robotic car, which obviously needs battery power for it and the RPi. I've no problem with the battery pack for the car since it fits neatly into the chassis, but the RPi microUsb ...
1
vote
1answer
104 views

Simulate raspberry pi GPIO

Is there a software to simulate Raspberry Pi hardware design such as proteus? I would like : To use a raspberry pi as a virtual component, Do all the wiring, simulate, Simulate, test code, Check for ...
1
vote
1answer
411 views

Access the display from a python app running as a service

Problem: The code below can't access the display when running as a service. I have my raspi hooked up to a touch screen monitor in the kitchen and I've attached a Passive Infrared sensor to the GPIO ...
2
votes
1answer
5k views

How to set a GPIO pin to default HIGH before setting it to output?

I have a raspberry pi connected to a Sainsmart 4-channel relay, where each relay is activated by a LOW signal. When I set a GPIO pin to output, it defaults to LOW, which of course activates the ...
0
votes
0answers
26 views

Clamp on DC Ammeter with Raspberry Pi to Monitor 12v Batteries

We are looking to use raspberry pis to monitor banks of 12v batteries in a real world environment. We currently are able to use a USB voltmeter from : http://www.digital-measure.com/html/...
0
votes
1answer
403 views

Controlling Ground Pins on a Raspberry Pi zero

I am attempting to make an LED matrix such as in this tutorial: http://www.appelsiini.net/2011/how-does-led-matrix-work. Is there any way I can control components being grounded whilst keeping as many ...
0
votes
2answers
248 views

Pin state change event doesn't trigger

I recently bought a PIR Motion Sensor and wrote a java program which prints in the console whenever movement is detected. I connected the pins properly, and the signal to GPIO_17 according to the BCM ...
0
votes
1answer
552 views

Node-Red Raspi GPIO: Using only rising trigger

When using node-red with raspberry pi 3 GPIO, node-red will send a message, every time the state changes (= rising and falling trigger). Is it possible to only send messages on rising trigger? Using ...
3
votes
1answer
2k views

How to use a GPIO pin after I put on a HAT?

I got a Speaker pHAT for my Pi Zero. According to the pinout, it only uses 5 GPIO pins, so plenty of room to add something else. The problem is, I'm not sure what's the best way to physically attach ...
0
votes
1answer
38 views

How to connect Relay module to Raspberry Pi

I have a relay module exactly like the one on the next page : https://microcontrollershop.com/product_info.php?products_id=5919 I wanted to consult you about the correct way to use it. I connected ...
4
votes
1answer
2k views

GPIOZero button not working

I've been getting into GPIO recently with the GPIOZero library but when i first tried it today it completely failed. As my first foray into GPIO i set up a circuit to light up an LED with the push of ...
1
vote
1answer
2k views

Problem with ESC, brushless motor and Raspberry Pi

I have connected an ESC (an electronic speed control) with a battery and a brushless motor. The Raspberry is connected to the ESC to control it. I know - when I turn on the program that is on the ...
0
votes
1answer
59 views

How to remap pins?

I would like to learn how to remap the GPIOs on the Raspberry Pi Zero. How to make Physical Pin 11 to act like something else ?
0
votes
1answer
2k views

How to set dtoverlay @ config.txt?

No.1 - I have one rasperry pi 3 where hyperion (ambilight) is running. No.2 - And one rasperry pi 3 where I have an IR transmitter (with lirc) for sending commands to the tv. I need to have both ...
2
votes
1answer
418 views

Error when sending second start command to Cylon.js to blink LED

Using Node.js, express and cylon.js, I'm getting a post request and blinking an LED using a raspberry Pi. I receive the first post request fine, the code runs and the LED blinks. However on the second ...
0
votes
2answers
870 views

Mulitple Input state changes/event detection

Picture 1 shows my setup. I connected the RPi3 Input parallel to an I/O terminal. The inputs are connected to a pull down resistor setup. Pictures 2 and 3 show the setup more in detail. Program-> ...
2
votes
1answer
2k views

Kodi on a GPIO screen

I recently bought a 3.5 inch TFT touchscreen connected by GPIO to my raspberry. I finally managed to make it work with Raspbian. however, when I launch KODI, the image on the TFT freezes and KODI ...
0
votes
1answer
603 views

Using gpio from CLI to trigger a rising or falling event detection

I have a python system script with various functions. I have multiple buttons hooked up to the Pi and I am using this code: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(22, GPIO.IN, ...
0
votes
1answer
40 views

GPIO pin numbers for gpiozero class

So im trying to learn robotics with raspberrypi and I am following two different guides where I chose the wiring from one guide and the code from the other guide. My left motor is working but the ...
0
votes
1answer
452 views

RPi.GPIO not working at all

I have just started with the GPIO on my raspberry pi but can't get any of the code to work. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18,GPIO.OUT) ...
1
vote
1answer
821 views

PWM object's ChangeDutyCycle method is not working

I have a motor class but I dont' know why this motor cannot change speed class Motor: def __init__(self, pos, line_status=0): def set_motor_gpio(_a, _b, _pwm): self._A = _a ...
1
vote
1answer
22 views

Using Both +5V GPIO Pins for More Current?

According to this website: https://pinout.xyz/pinout/pin2_5v_power# The +5V GPIO pins can push up to 1.5A of current, and are attached directly to the Pi's power supply. My question is, if I use ...
2
votes
1answer
662 views

Read RF from Remote trouble

I have myself a Raspberry pi and Arduino which I've equipped with a 433mhz transmitter (to the arduino) and a 433mhz receiver to the Pi. I can read the output fine from the transmitter in Pi console ...
0
votes
1answer
27 views

Power external op-amp using GPIO 5v and GND pin

Maybe a very simple question, is it safe to connect an external op-amps Vs+ and Vs- to the GPIO pins for 5V and GND respectively? I have read shorting these pins may cause fuses to break in the Pi. ...
0
votes
0answers
40 views

GPIO Pins not changing in mono c#

I am trying to read a pin on my Pi 3 model B+. It runs on raspbian, the application is programed in C# and I use mono to run it. I'm using the RaspberryPiDotNet library, which I compiled in windows ...
1
vote
1answer
488 views

Can not use GPIO pins when Official Raspberry Pi screen is connected

I have a Raspberry Pi2 B+ model, with noobs distro installed. I had some programs using wiringPi library and an ultrasound component working (tested them using a separate monitor via HDMI). However, ...
0
votes
1answer
2k views

Software serial send with PIGPIO sending garbage

I have been using the excellent PIGPIO (http://abyz.me.uk/rpi/pigpio/python.html) to communicate with two RFID readers. One is attached to the inbuilt UART while I have been using PIGPIO to connect ...
2
votes
3answers
670 views

GPIO relay signal cross turns to all relays staying on after Darlington added

I have 4 Sunfounder 2 channel relays 7 of which that I'm using to control some things on my aquarium. I suspect that I may have wired them up wrong somehow though. The behavior I'm seeing is as ...
0
votes
1answer
2k views

Change I2C Pins on Raspberry Pi

On a RPi 3, default SDA-I2C and SCL-I2C are assigned to pins 3 and 5 (same as GPIO02 and GPIO03). Is possible to change to another pins? How can I do this?
2
votes
1answer
700 views

UART pins not reading sensor output RPI3

This is my first pi project so im a bit new at this. Im trying to connect a senseair K-30 CO2 sensor to the pi via the UART gpio pins. This is the sensor I am using: https://www.co2meter.com/products/...
0
votes
1answer
102 views

Control GPIO from HDMI V sync

My Project on a Raspberry Pi 2 with Raspian stretch. I want use a GPIO pin to drive 3d shutter glasses (glasses hacked to receive 0 _3V square wave) Video playing on the HDMI port and A Pin goes on ...