Questions tagged [pi-gpio]

For general questions about the GPIO pins, do not use this tag; use [gpio]. This tag is for the npm (node.js package manager) module for controlling the GPIO pins on the Pi using JavaScript. It is unrelated to the pigpio C/Python library. There is also a dynamic C library to control Raspberry Pi GPIO channels https://github.com/Milliways2/pi-gpio.git

For more information, downloads, etc., see:

https://www.npmjs.com/package/pi-gpio

Please Note!

If you are not aware, there are a number of different pieces of software that serve a similar fundamental purpose (controlling the Raspberry Pi GPIO pins) and are independent of one another. Not surprisingly, they also all use spins on combining "rpi" and "gpio" in their name. Each has a separate tag and questions about their use should use that specific tag. This is documented here to prevent confusion.

  • The page you are on now is for the pi-gpio node.js (javascript) library: Tag
  • The pigpio library, written in C but with ports to python and other languages: Tag
  • The RPi.GPIO module for python: Tag

This isn't intented as an exhaustive list of such software, just the three most prone to confusion here due to the similar names perhaps made more similiar by restrictions on tag labels (all lower case, etc).

34 questions
11
votes
5 answers

How to connect a graphic card to Raspberry pi?

I want a way to connect a graphic card like nvidia or amd to raspberry pi do you think has a way to do that?
kiumars khaleghi
  • 125
  • 1
  • 1
  • 7
8
votes
2 answers

Creating jumper leads from ethernet cables - connect multiple components

I've bought some crimpers and a dupont connection kit and I'm planning on reusing some old cat5 ethernet cables I have. Is it reasonable to connect two devices to the RPi via the 8 wires in the cat5 cable? For example connecting four jumpers to 4…
Stuart Brown
  • 229
  • 2
  • 7
6
votes
2 answers

GPIO - RuntimeWarning: This channel already in use, continuing anyway

I was trying to run a motor using the Pi. It was working fine before when I was executing using a Python script. Later I installed WiringPi and tried to execute the GPIO using shell script and it worked once. After that nothing was working, neither…
Rocky
  • 61
  • 1
  • 1
  • 2
3
votes
1 answer

Switching a Circuit on/off with a MOSFET

I have have a simple circuit that I want to drive with a raspberry pi GPIO pin and I want to use a MOSFET to control the circuit. My circuit will be using about 3-5v and 2-3a. I'm planning on using a IRLB3034PBF. Or maybe an IRF510 since that is…
Taylor
  • 131
  • 1
  • 3
  • 7
3
votes
0 answers

pi-gpio does not turn on/off the pin

I installed the HAP-NodeJS and I am using the Light_accessory.js to control a light. I Also installed pi-gpio and when the server is running I see that the state changes from 0-1 and vise versa. The lights does not turn on/off. Do you have any…
user01230
  • 31
  • 2
2
votes
3 answers

Will 3.3v gpio work for a fan without hurting the pi?

Will it hurt the pi if I run a fan on the 3.3v gpio? I have a hdmi lcd screen on mine and I don't want to use the usb ports for a fan. I have a raspberry pi 3 by the way
kyran bullard
  • 139
  • 2
  • 2
  • 11
2
votes
1 answer

pigpio PWM and ALSA

My Qt ( C++ ) application successfully dims the screen using the pigpio library on my Raspberry Pi compute module. It works great and is very stable using the code below. The problem, is that my previously working ALSA code that successfully played…
PhilBot
  • 71
  • 3
  • 7
  • 25
2
votes
1 answer

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 per this guide: var gpio =…
knocte
  • 157
  • 1
  • 1
  • 8
1
vote
2 answers

Is there any way to control Raspberry Pi GPIO pins without Webiopi?

I want to control my Raspberry Pi GPIO pins over internet, but as I searched for answers I found Webiopi. I don't like Webiopi, so I am searching for any other way to control the pins with Python. Thank you!
M.Simel
  • 23
  • 1
  • 4
1
vote
2 answers

Use GPIO to trigger button press in software

I have a ceiling fan remote that I want to control using the Raspberry Pi. Instead of sending RF signals or buying a Wi-Fi wall switch to do any of this, I'd like to use an existing RF remote and press the buttons in software by making electrical…
Sawtaytoes
  • 211
  • 3
  • 13
1
vote
1 answer

Using the ds18b20, why are you limited on pins you can use? GPIO4 only one that seems to work

This is in reference to this thread where they are all using GPIO4. I've got A0 of an arduino going into an arduino nano (using firmata) and then into GPIO4 since it appears to be the only pin that'll work. I have tried other pins and noticed that…
1
vote
2 answers

Can I use a transistor as a relay with the Pi?

I want to build an electric circuit which has to have a power of nine volts. Can I use a circuit like this, without breaking the Pi? Or is there a better solution?
user5507356
  • 13
  • 1
  • 3
1
vote
0 answers

Cannot get pigpio PWM to work with an AC dimmer module

I am using an AC dimmer module to dim a 240V light. I would like to use node.js so I am using the pigpio module. The script is not working as expected as the light bulb goes straight to 100% when I execute the node.js script. The AC dimmer module is…
Martin
  • 113
  • 1
  • 6
1
vote
1 answer

Get export state of GPIO pin (pi-gpio)

I'd like to get the current export state (output / input) of a GPIO pin on a RaspberryPi using JavaScript. Due to the fact that I've a low-active relay, which is activated in the second I export out a GPIO-pin, I need to be able to specific control…
user3191334
  • 305
  • 1
  • 7
  • 15
1
vote
1 answer

why GPIO does not work when executed from python shell but works from script

When I run this python script led.py it works. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(24,GPIO.OUT) print("LED on") GPIO.output(24,GPIO.HIGH) time.sleep(1) print("LED…
Ciasto piekarz
  • 355
  • 2
  • 12
  • 28
1
2 3