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

gpio pin set to output 1 but no current flowing through the fan

I have 2 RPi-4. I've been using a fan inside a case that is designed by Canakit to be used with RPi-4. I've been using the fan for a few weeks by connecting it to constant 5V and ground. Everything ...
0
votes
1answer
21 views

Displaying number 0 to 9 in a common Cathode 7 segment display

I am using Raspberry pi to display 0 to 9 in a common cathode 7-segment display. A Raspberry pi only has 4 power sources but a common cathode 7 segment needs me to control all the 7 segments ...
-1
votes
0answers
24 views

What are the correct wire terminals for this limit switch? [closed]

What is the correct name/type of these female wire terminals? A link to a product page would be greatly appreciated. I'd like to crimp them to cables that connect a limit switch to RPi GPIO pins. See ...
0
votes
1answer
22 views

Is it safe to drive the ENA+, DIR+ and PUL+ ports of a stepper motor driver with a 3.3v pin from the RPi 4 GPIO header?

I'm using this Cloudray 2-phase stepper motor driver DM422S to drive this Cloudray Nema 17 stepper motor (52Ncm 1.8A). I connected the signal ports for ENA+, DIR+ and PUL+ of the motor driver to the 3....
0
votes
1answer
28 views

connect an digital gpio output to a digital gpio input

I want to use a GPIO-out to talk to a GPIO-in... two different programs running on the same pi. The program with the GPIO-in can be activated by either a button, or the other program... with the GPIO-...
1
vote
1answer
29 views

Power supply for stepper motor driver board

I'm doing a project where I wish to use 5 stepper motors simultaneously. I've ordered these (with driver board included) https://www.amazon.ca/gp/product/B015RQ97W8/ref=ppx_yo_dt_b_asin_title_o01_s00?...
0
votes
1answer
57 views

Can I add a second processor to pi 4b 8gb? Is it even possible?

I want to get more than the most possible performance out of my pi 4b. I was looking around, and I saw it was possible to get just the processing unit for the pi 4 without the rest of the pi. I ...
0
votes
0answers
28 views

Raspberry Pi | Data Communication | Process Data

I need to receive electricity data from a charge controller with a raspberry pi and process these data on the hmi screen. How can I get accurate information about raspberry pi data communication, how ...
1
vote
1answer
29 views

How can I connect raspberry Pi 4 to submersible water pump

I recently handle a part of my team project which is hand sanitizer part came up with the idea of using a raspberry pi to power and control the hand sanitizer system. It's nothing large scale, but I ...
0
votes
0answers
21 views

High speed TTL pulse generation

I'd like to take ~400 MB binary file, where 0's indicate low and 1's indicate high, and stream this out the rPi I/O with 20 ns time base. So something like 0000101001 Would yield Low Low Low Low Hi ...
-1
votes
0answers
20 views

Monitoring GPIO and MCP pins in same Python program

I currently have 2 Python programs, one is monitoring the GPIO pins and another is using I2C and the MCP pins for I/O. I'm able to code for either separately, but would like to monitor I/O from GPIO ...
0
votes
0answers
24 views

GPIO event monitoring fails on Zero 2

On my (first) Raspberry Pi Zero 2, gpiod_ctxless_event_monitor (from libgpiod) fails, while identical calls succeed on my other Pi 3 and 4. Is this a limitation of the Zero or does this indicate that ...
2
votes
2answers
87 views

Removing noise from I2C inputs

Removing noise from I2C inputs. I have 32 input switches to monitor so I’m using multiple MCP IC‘s communicating over I2C. I’m getting noise when nearby solenoids are activated. There is no impact on ...
1
vote
3answers
41 views

Is It Safe To Connect A 16 Port Servo Driver's External Power Supply To My Raspberry Pi? (Will It Cause A Brownout?)

I have an adafruit 16 port servo driver. In the directions on their webpage, they explain how to wire it, as well as connect an external power supply. They mention not to plug the power directly into ...
0
votes
0answers
28 views

PWM Set mode problem

As you know to work with Hardware PWM you must enable it at /boot/config.txt .I did that and i set GPIO 19 as PWM1 . it works well . but I notice that after the Raspberry Pi boots the GPIO 19 gives a ...
0
votes
1answer
40 views

How To make Raspberry Pi Hardware PWM off after startup

I am driving motor using ESC with Hardware PWM signal comes from Raspberry Pi ,I set the GPIO 19 (PIN 35) to be PWM1 , the problem is when the Raspberry Pi startup it gives output value to PWM1 (GPIO ...
0
votes
1answer
48 views

L298n driver with 3.3V Voltage

I am using L298N motor driver for DC motor. First, I tested the motor with Arduino, by giving PWM signals to the enable pin of the L298N pin. I have two questions: Arduino can supply average 5V ...
0
votes
1answer
42 views

How do you program a 1x4 Matrix Keypad in Raspberry pi?

I bought a 1x4 Matrix Keypad https://www.google.com/url?sa=i&url=https%3A%2F%2Fshopee.com.my%2F-Luminense-1x4-Matrix-Memberane-Switch-Keypad-Numpad-Arduino-Raspberry-Pi-i.63040732.4334990197&...
2
votes
3answers
71 views

How to test for a device at an I2C address

I use i2c-detect to find connected i2c devices on my Raspberry. For example: Now I want to use that information to perform some tasks, for example: if “Address 76 is connected”: DO STUFF For this, ...
1
vote
0answers
33 views

Pins of GPIO expander 'MCP23017' randomly turning on when connected to multiple motor drivers powering 3V dc motors

I have a MCP23017 GPIO expander connected to four DRV8833 dual channel Motor drivers. This setup is later meant to drive eight motors concurrently. I tried testing a few patterns and noticed that ...
-1
votes
1answer
39 views

How to set raspberry pi gpio to low at boot (PWM pins)

I have project that works with raspberry pi 3 which control a motor speed through PWM0 pin (GPIO 19), the problem is that raspberry pi give high state after startup , which cause the spinning of the ...
0
votes
1answer
28 views

Is it possible to power a pi 4 from 1 source and turn on and off using another power source?

I have a raspberry pi 4 and 2 5v power sources. 1 of the power source is always on and i would like it to power my pi. The other one i will be connecting to a 5v to 3v converter and connect it to a ...
0
votes
2answers
34 views

MG 996R Servo only works in one direction with pi 4b

I have an MG 996R Servo from DM DIY More hooked up to physical pin 18 of my raspberry pi 4b running python 2.7.16 with GCC 8.3.0 on Linux2. I am powering the servo with an external 5V supply capable ...
0
votes
0answers
64 views

Hx711 gives random values with RaspberryPi 4

I created a weight scale using a RaspberryPi, Hx711 and 4 load cells. I followed this tutorial and did everything like shown there. This is the circuit they used: I also used tatobari's hx711py ...
-1
votes
1answer
34 views

UART Rx TX pins not reading sensor output RPI3

This is my first pi project so I'm a bit new at this. I'm 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/...
0
votes
1answer
41 views

Controlling a rotary encoder through a Tkinter interface (letting RPI control the dial instead of the dial controlling a function on the RPI)

EDIT*** I have a "STEC11B03 ALPS" rotary encoder and I want a python script to output the same signal to the circuit as the rotary encoder does when turning. I want the script to do the same ...
0
votes
2answers
48 views

Using GPIO PWM with sysfs

I'm able to write to GPIO pins with sysfs with the standard commands like echo "1" > /sys/class/gpio/gpio6/value, but that only turns the pin on or off. I tried echo "0.5" > /...
0
votes
2answers
16 views

Does the RPI v2 B and the RPIv4 B have the same pinouts?

Question: Do the RPI v2 B and the RPIv4 B have the same pinouts? example: https://www.etechnophiles.com/wp-content/uploads/2021/01/R-Pi-4-GPIO-Pinout-1-768x572.jpg?ezimgfmt=ng:webp/ngcb40
0
votes
0answers
12 views

How to set SPI0_CE0 to be GPIO8 on CM4

I have a CM4 that has a WS2182b RGB LED on GPIO8 as seen in the diagram below: I think I need to change something in /boot/config.txt to be able to use GPIO8. I still want to use SPI0 if possible, ...
0
votes
2answers
36 views

Raspberry Pi 4 GPIOs are constantly on, even after restarting and cleaning up GPIOs

So, I got a Raspberry Pi 4 Model B, and I'm trying to make a project using relay boards. Turns out, when I turn on my Pi, one of the pins is already active and the indicator turned on partially. I ...
1
vote
1answer
37 views

Raspbery Pi GPIO Hat

I've got this Raspberry PI GPIO [expansion hat][1] attached to a Raspberry PI 3b and have a question. Even though the terminal blocks are well labeled, I don't think I understand what pin numbers of ...
0
votes
1answer
26 views

Signaling a Pi from an Arduino

I am building a project that uses an Arduino for controlling addressable LEDs and a Pi for sending data over usb. What I am trying to figure out is whether there is a way to have the Arduino signal ...
0
votes
1answer
53 views

ClassNotFound when sudo java

I have a computer lab which is set up with piserver and 3B+ raspberry pis. I want my students to be able to write java code that will use the GPIO pins, so they will need to sudo java their programs. ...
1
vote
1answer
103 views

Audio output on Raspberry pi Zero W

I was trying to take an audio output from piZero-W, the article I followed was, this one. How to get audio through the gpio pins to a 3.5mm jack? When running - systemctl status alsa-state the result ...
3
votes
4answers
933 views

Can unstable PWM timing be corrected?

I would like to set the motor speed of a RPLidar A3 which requires a 25 kHz PWM. So I played around with the following: from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) pwm = GPIO....
0
votes
2answers
35 views

Three-Pin Switch for On/Off, Pi Zero W

I'm a novice python coder, and even more novice pi user/electronics person. I'm trying to set up an on/off switch on my headless pi with a three-pin arcade switch I found. Right now the switch is ...
0
votes
1answer
38 views

Is it possible to connect multiple WS2812 LED Strips to a Raspberry Pi 3?

im new to the Raspberry Pi in general and followed this tutorial https://dordnung.de/raspberrypi-ledstrip/ws2812 to control a single LED Strip. I was wondering if it was possible two control a second ...
1
vote
2answers
72 views

How to enable the second serial port on a pi4

I am trying to use the second serial port. In /boot/config.txt I have put at the end : # swap UARTs dtoverlay=pi3-miniuart-bt dtoverlay=uart2 enable_uart=1 I have checked and re-checked the pin ...
0
votes
2answers
38 views

Does GPIO 1 have to connect to an EEPROM?

I was wondering whether or not e.g. GPIO 1 should be used for connecting to EEPROM's only, or whether it is still fully functional for all other purposes. It could maybe also be that the pin is only ...
0
votes
1answer
27 views

Does GPIO27 need special handling when used as digital input?

I have three rotary encoders (with switch) connected to GPIOs (16,17,18), (19,20,21), (22,26,27). For quick testing of working I/O, I put all of them to input mode, with internal pull-up, and watch ...
3
votes
4answers
228 views

What is the correct way to access GPIO on RPi?

I have a brand new Compute Module 4 with Raspberry Pi OS installed. The system is up-to-date, but I cannot read GPIOs or change their state. $ gpio -v gpio version: 2.52 Copyright (c) 2012-2018 Gordon ...
0
votes
1answer
24 views

How to connect keypad to Pi Zero

I've tried to find info but with no luck. I'm trying to make a project - barcode scanner - using RPI zero. I need a keypad to input quantities when I scan a barcode. I am unable to find any phone-...
0
votes
1answer
36 views

Detecting connection between two arbitrary GPIO pins on Pico [closed]

I wrote a code that I run in Thonny which detects if a connection is made between the 3.3V output and a GPIO pin on the Raspberry Pico: print("Hello World!") import time import digitalio ...
1
vote
1answer
63 views

Reading MCP23S17 port expander with pigpio

I'm trying to read from a handful of switches connected to a MCP23S17 port expander using pigpio, however I'm not getting any useful results. Whatever my switch values, I have 0 returned. I've checked ...
0
votes
1answer
65 views

Almost every GPIO input pin is showing up as pin 22 [closed]

EDIT: The problem ended up being that the ribbon cable going to my breadboard was rotated 180º. I was taking this into account, but doing so incorrectly. Once I correctly labeled the rotated pinout, I ...
0
votes
1answer
32 views

When To Use a Level Shifter (Arduino Uno + Pi SPI)

I was following this guide from Adafruit to flash an Arduino with a Pi using AVR-Dude over SPI: https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins?view=all I noticed ...
-1
votes
2answers
58 views

Checking which GPIO pin is high

In my program, I have 10 push buttons In a certain function of my program, I need to check if a particular push button is pressed. If it is pressed, function A should be called, while if any other ...
0
votes
1answer
40 views

RPi.GPIO library limitation - add_event_detect cache

How many callback events is cached in add_event_detect function? In my example below start_thread is executed just twice, but it is fired up five times (by the loop). To me it looks, that GPIO library ...
0
votes
2answers
67 views

Sensor gives different results using GPIO and USB

I have a RPi4B, MH-Z19C CO2 sensor and a UART to USB adapter. When I connect to the sensor using USB I get stable readings: {'co2': 1001, 'temp': 19, 'S': 0, 'U': 0} {'co2': 1006, 'temp': 19, 'S': 0, '...
0
votes
1answer
19 views

multiple GPIO.add_event_detect doesn't show encoder output

so i have 3 GPIO.add_event_detect's each one comes with callback function when only one GPIO.add_event_detect is enabled, it shows proper output but if i add 3 of them it doesn't show anything while i ...

1
2 3 4 5
62