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
3answers
3k views

Make a pin HIGH every time RPi startsup

I want to make pin no.15 (GPIO 22) as HIGH automatically, when the RPi is powered up. (Raspberry Pi 3 Model B) The status of the pin is used for a power on logic. This pin is used to check whether ...
1
vote
1answer
399 views

I²S Pins on Raspberry Pi 3

I looked at the schematics of the Raspberry Pi 3 here but couldn't figure out which Pins are what, to use the I²S Interface. Which Pin-Numbers are for: Bit clock line? Word clock line? Multiplexed ...
1
vote
2answers
489 views

Serial communication using RS232C

I am new to Raspberry Pi and GPIO communication, I am going to make a program to create a communication between my laptop and raspberry via serial com. After referred some tutorial, little confused ...
0
votes
1answer
542 views

Long length of wire off of GPIO pins

I am building a circuit with the Raspberry Pi that requires a button about fifty feet away from the central circuit. I am planning on using speaker wire for the connection from the Pi to the button. ...
0
votes
2answers
3k views

Max gpio input voltage

If I set a gpio to be an input could I damage it by directly connecting it to 3.3V? AFAIK you can't but why do people use a resistor in between? Sorry if this question is stupid but I could not find ...
0
votes
1answer
7k views

The Pi Zero W has 5v and 3v rails. What is the max current per GPIO pin on the 5V rail?

What is the max current per GPIO pin on the 5V rail of the Pi Zero W? Also, can I power a 5V relay (4 channel, each requiring 15-20 mA) from this rail? If not, does anyone know of a 4 channel relay ...
-1
votes
1answer
771 views

Is it possible to control 6v dc motors with pi?

Is it possible to control four DC motors with Raspberry Pi at the same time? If so, where can I find info on how can this be done (from the physical aspect)?
19
votes
7answers
46k views

Multiple temperature sensors with a Raspberry Pi

I have seen plenty of examples for using one temperature sensor with the Raspberry Pi, however, how can I multiplex 5-6 temperature sensors to a Raspberry Pi? I want to read the temperature from ...
27
votes
3answers
14k views

Can Raspberry Pi reliably bit bang a 9600 baud serial and is there example code?

I am wondering how feasible it is to use bitbanging to drive a 9600 baud serial via the GPIO pins on the Raspberry Pi. Obviously, Linux is not a terribly good platform for bitbanging, as there is a ...
15
votes
4answers
61k views

Receive FM Radio on Raspberry Pi

I want to feed the FM radio signals to raspberry pi. Having a basic understanding of electronics, I figured out that a FM receiver and an ADC is required. Now I need help on how to proceed with the ...
11
votes
2answers
26k views

Properly wiring a solid-state relay to the GPIO pins?

tl;dr — I'd like to connect this relay to the GPIO pins on my Raspberry Pi B+. I'm looking into purchasing a solid-state relay for my Raspberry Pi. After a great deal of searching, I came ...
4
votes
1answer
8k views

Major trouble with nRF24L01+ controllers and the RF24 library

I've had a hellish last three days. All I've wanted to do is get an Arduino Uno and a Raspberry Pi B+ talking to eachother with these little guys, and after following many different tutorials, I've ...
10
votes
2answers
9k views

How to install node.js with GPIO

I am trying to install node.js on my Raspberry Pi as well as GPIO. I am running a brand new install of Debian Jessie I could get nodejs v.0.10.29 installed. No matter what I do, this is pretty much ...
8
votes
2answers
17k views

What's the right way to run a python script as a daemon (service) in raspbian (or debian)?

I'd like to use my Pi as a home thermostat, with the control loop running in a python script. I want to run it as a daemon on raspbian (debian) at startup. There's an example bash script in /etc/init....
6
votes
2answers
6k views

Implement a GPIO function with a callback calling a asyncio method

I am testing a sensor attached to the GPIO in raspberry using python 3.5. The idea is something similar to this link. My code is: gpio.add_event_detect(4, gpio.RISING, callback=lambda x: self....
11
votes
6answers
14k views

GPIO: Why wire button to ground rather than +3.3v?

In most examples I've seen of wiring buttons to GPIO inputs, the button is wired so that when closed, a circuit is completed between the pin and ground, producing a low input on the pin. A pull-up ...
7
votes
3answers
11k views

How to read Analog 5V sensor ouput with Digital 3.3V GPIO?

I bought the "Sunfounder Sensor Kit" for Raspberry Pi 2, but the whole content is made for Arduino (5V). I have bought ADC, Level Shifters but I am stuck because I think I certainly miss a simple ...
2
votes
2answers
7k views

Electronics of a water pump [duplicate]

So, I would like to connect a water pump to my Pi and programatically turn the pump on and off. I am looking at this pump: http://www.cooking-hacks.com/immersible-pump-water-tube-for-open-garden-...
15
votes
3answers
80k views

How to correctly install the python RPi.GPIO library

I downloaded RPi.GPIO 5.3a from here: https://pypi.python.org/pypi/RPi.GPIO I extracted the tar file, cd into the folder and ran: sudo python setup.py install It ran through a bunch of stuff and ...
12
votes
3answers
5k views

Can I connect a 16x2 LCD screen to the 5V GPIO?

From what I've seen of articles and videos online, everyone seems to be using the 3.3V GPIO pin. I have an LCD screen which requires a 5V power supply and I wondered whether it would be safe to use ...
8
votes
3answers
2k views

Cambridge University Raspberry Pi Operating system development Guide Questions

I'm a high level app developer (C#, python) and I'd like to get my hands dirty with low level embedded application development. Cambridge University has posted a series of tutorials teaching you how ...
8
votes
6answers
17k views

Reed switch wiring

Working my way through a garage door project. I purchased a few of these but I'll be danged if I can find a consistent answer on how they're wired to a Rpi. My thought was just start hooking it up ...
7
votes
2answers
23k views

Count RPM/Frequency/Pulses on GPIO ports (Maximum?)

I'm planning to count the RPM of a RC Car which is controlled with a PI B+. But while planning the question occurs, how to count the RPM. My Idea is via a Sensor, which gives a Pulse every Round, and ...
4
votes
1answer
3k views

Using Pi's built-in audio as general-purpose DAC?

Any common Audio output on any electronic device is in essence a two-channel Digital-to-Analog converter, where the voltage sent to each of the channels (Left, Right) powers the electromagnet that ...
4
votes
1answer
13k views

How do I set CLK speed on SPI for Raspberry Pi

I have managed to get some sensible data trough the ADC(MCP3008), but I'm struggling to find out how to set the SPI-Clock. The ADC (MCP3008) uses 24 clock-pulses to make one sample therefore I ...
2
votes
1answer
12k views

Measuring voltage and current of battery

I have built an audio amplifier and i am going to put a raspi there to make the input wireless. The whole system is going to be supplied by a 12V closed type acid battery. So what i would like to do ...
16
votes
5answers
4k views

Do I need to use a ribbon cable for GPIO?

I haven't gotten my R-Pi yet, otherwise I would've just tried it, but do I need a ribbon cable to use GPIO or can I just connect a bunch of wires from the pins to a solder-less breadboard?
13
votes
2answers
9k views

What are the different clock sources for the general-purpose clocks?

I'm trying to generate a clean 11.289 MHz clock signal from the general-purpose clock, GPCLK0 on GPIO4. The suggested route is to use the 19.2 MHz crystal as the source, which seems to work ...
12
votes
5answers
14k views

Can I read the amount of light?

I'm not sure how to say it, but I would like to read the 'amount of light' with my Raspberry Pi. By the 'amount of light' I mean a number between 0 and 100 (for instance) where 0 is no light/dark and ...
10
votes
3answers
9k views

Can I use the 3.3v pin instead of the 5v pin?

I am using a HC-SR04 ultrasonic sensors, and I don't have enough 5V pins on a Raspberry Pi, and I don't want to buy an expander. So is it possible to use the 3.3V pins on some of the sensors? What ...
10
votes
1answer
2k views

If I power my Pi from GPIO, can I detect that it's not being powered by USB?

I'd like to create a backup power solution for my Raspberry Pi, and I'd like a notification to come up that the Raspberry Pi is running on this backup power. This notification has to tell me that ...
10
votes
3answers
3k views

Precautions to be taken while using the GPIO pins

As a newbie to the Raspberry Pi and electronics in general, I would like to start hacking around with the GPIO pins but any tutorial around the Internet warn me about frying the Pi one way or the ...
10
votes
1answer
13k views

Does short-circuiting GPIO pins damage the Raspberry?

Does accidently connecting the wrong GPIO pins damage the Raspberry Pi or is there some protection like a fuse?
8
votes
2answers
8k views

GPIO library for C

I want to utilize the GPIO pins on my Raspberry Pi 2, but I'd rather not use Python since I personally dislike the language. However, I cannot seem to find any information regarding the use of C, only ...
8
votes
1answer
1k views

Locked (Atomic) Register read/write

I'm coding something using direct control of GPIO, there are some good resources around for this, such as http://elinux.org/RPi_Low-level_peripherals#GPIO_hardware_hacking ; the process involves open("...
8
votes
3answers
5k views

How does the Raspberry Pi differentiate between multiple expansion boards?

I am just getting started with using the GPIO on the Raspberry Pi for various projects. There are many breakout boards for the RPi and many of those have pins in order to stack boards on top of each ...
8
votes
6answers
71k views

GPIO Pinout Orientation RaspberyPi Zero W

I looked over various websites providing the pinout explanation, especially this . But I have trouble to figure them to the real rpi zero. I mean in the following image provides the pinout Information:...
7
votes
1answer
1k views

Raspberry Python Libraries

I am currently working with a Raspberry Pi (Model B+) and have some experience with Arduino (and it's derivates). Now, there are three Libs for GPIO access with Python for the Pi: WiringPi (...
7
votes
2answers
3k views

How to change the Pin used for the 1-wire Bus

By default the header Pin Nr. 7 us used by the 1-wire kernel module. I would like to change it to a one of the 4 new GPIO Pins of an Rev 2 Pi.
4
votes
2answers
337 views

Random GPIO values when ribbon cable is connected

I've installed the GPIO python library to read/write to GPIO pins. To get the state of the pins I'm using "gpio readall" which displays a table with all the pins from the RPI and I can see which pin ...
4
votes
2answers
3k views

Power on from idle with gpio3, undocumented?

Reading this thread I found out that you can power on the rpi from idle by connecting gpio3 (pin5 revB) to ground, tested it and it works great. I didn't read that anywhere else, including in the ...
4
votes
2answers
3k views

How to have a Raspi trigger a Remote Control physically

I have a Remote Control for my windows shades and I would like to be able to trigger them using some software using a web interface or an android app. As I am an enthusiast programmer I would like to ...
3
votes
1answer
838 views

RPi.GPIO mysteriously crashing when setting up pin

I'm trying to test the following simple "blink" RPi.GPIO Python script. import RPi.GPIO as GPIO LED_PIN = 18 # GPIO 18, (P1 pin 12) print 'A' GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme ...
3
votes
3answers
7k views

5v Relay will not close (unless using GPIO cleanup)

This seems like it should be really simple, so maybe I am missing something. I am just trying to open and close my relay but all it does it open's and doesnt close. I can use GPIO.cleanup() to make it ...
3
votes
2answers
3k views

Connect GPIO output to second Raspberry Pi input

Is it safe to connect a GPIO output to a GPIO input?? For example: Set the GPIO input to GPIO.PUD_UP and connect it to GPIO output. Then when the output is HIGH, then the input is logic 1, and when ...
3
votes
2answers
11k views

How To Switch On/Off A Circuit using GPIO

I have a simple circuit that runs on 5 volts. Let's just say for simplicity that it is a circuit with an LED that lights up when a push button is pressed. The problem is that it has a push button ...
3
votes
2answers
4k views

What can I do on a Pi with an Infrared sensor but no Arduino?

So, in a recent batch of purchases from Adafruit, I picked up one of these $2 gadgets: http://learn.adafruit.com/ir-sensor/overview It can pick up signals from TV remotes and such. I'm wondering, ...
2
votes
1answer
9k views

GPIO pin output stays high after setting to low

I'm working on a project in which I have to set a GPIO pin of the Raspberry Pi to high/low in order to signal a transponder which in turn communicates with a lock and opens it when it receives a high ...
2
votes
2answers
799 views

GPIO pins NOT working when using touchscreen

I have bought this touch screen. It looks and works great. I wanted to play round making a simple Kivy app with buttons that turn on/off LEDs and relays. But it seems that when the screen is ...
2
votes
3answers
9k views

PHP + PYTHON + LIGHTTPD + Raspberry Pi GPIO to control the Robotic Arm

I was able to control one arm of an OWI-535 (Maplin) Robot Arm using GPIO pins and python programming (via L293 driver) , so I tried to do the same using a web page created in PHP. Created buttons ...