WiringPi is a C language library for accessing GPIO pins.

learn more… | top users | synonyms

1
vote
1answer
27 views

allow other user to run wiringPiSetupSys()

I hava e program called outlet in which I communicate out on wiring pin 2 corresponding to BCM-PIN 27 on my Pi: #include "NewRemoteTransmitter.h" #include <stdlib.h> #include <stdio.h> ...
0
votes
1answer
16 views

wiringPiSetup: mmap (PADS) failed: Cannot allocate memory

I've been trying to change the TLC5940NT library for Arduino that can be found here https://sites.google.com/site/artcfox/demystifying-the-tlc5940 so that I can use it on Raspberry Pi, but I keep ...
3
votes
2answers
71 views

I2C using wiringPi or IOCTL in C, more than 2 bytes

I'm willing to send 20 bytes at a time to Arduinos via I2C bus. I'm writing a C program (that will become a Daemon) that should achieve this, and thus I downloaded via Git the last wiringPi library, ...
3
votes
2answers
53 views

Project needs multiple PWM

I'm working on a project that needs three (or more) PWM pins to work. But unlike Arduino, the Raspberry PI B+ has just one PWM pin. I've searched for solutions and I found that I can use the WiringPi ...
3
votes
1answer
31 views

Is it possible to speed up code processing time by increasing i2c baudrate?

Is it possible to speed up execution time of a c++ program in raspberry pi solely by increasing the i2c baudrate and increasing the sampling frequency of the sensors? I have the issue of sudden ...
0
votes
1answer
43 views

Sequential Control - time and signal based in C

i want to program in C a simple sequential control with the raspberry. The current task is: If a button is pressed, something (e.g. a LED) shall be switched on for 5 seconds and then go off itself. ...
4
votes
2answers
103 views

gpio not working

I'm quite new to the Raspberry world, and I cannot figure out what's not working on my tiny test project on my B+. I connected a red LED to the 3v3 (pin#1) and a resistor to the ground (pin#6), and ...
4
votes
1answer
122 views

Using BCM GPIO pin numbers with wiringPi C library

I'm a GPIO newbie experimenting with getting my Raspberry Pi to blink an LED with C using the wiringPi library. The example code at http://wiringpi.com/examples/blink/ (blink.c) compiles perfectly and ...
3
votes
1answer
51 views

Output Accurate, Detailed PWM signal

I'm building a quadcopter using the RPI 2 Model B. I'm currently using the Pi4J library (Java library that wraps the WiringPi library) for my project. All is going well except my ESC (Electronic Speed ...
1
vote
1answer
41 views

wiringpi2 digitalWrite() has no effect

Hello fellow rpi lovers :-) I've encountered a very strange problem in my rpi-based project: I'm trying to control just one pin in OUTPUT mode so I use more or less such code: import wiringpi2 ...
4
votes
2answers
49 views

What is the byte order for the WiringPi 16 bit I2C reads and writes?

The WiringPi library has APIs called wiringPiI2CWriteReg16 and wiringPiI2CReadReg16 for writing and reading 16 bits of data from a given I2C device at a specific register. Since the resulting 16 bit ...
1
vote
2answers
81 views

GPIO Broken - cannot power - depower pins

I got my pi2 this weekend and started experimenting. Now I tried adding LEDs to the GPIOs the way I know it from arduino and all the forums do it. Pin>LED>270 Ohm>GND I attached two: pin 17&27 ...
1
vote
2answers
93 views

I Cannot Change the State of the GPIO Pins

I got a RPi 2 model B v1.1 a while ago, and I am having way too much trouble trying to change the states of the GPIO pins. I have tried RPi.GPIO with a simple Python script and WiringPi in the command ...
1
vote
2answers
54 views

GPIO - Is there someway to make the GPIO mode permanent?

Is there someway to make the changes from the GPIO utility permanent? Right now if I restart my RPi the changes revert back. I know I can use a script, but is there someway I can make the script start ...
0
votes
1answer
47 views

WiringPi - GPIO Output Vs PWM

So in the GPIO utility from WiringPi there is a command to change the mode of the GPIO pins. There is input mode, output mode and PWM mode. What is the difference between output mode and PWM mode? Is ...
0
votes
0answers
14 views

Which GPIO pins are 0V at startup? [duplicate]

So I'm doing a project today with the Raspberry Pi 2 Model B and I realized that some (not all) of the GPIO pins output 3.3V at startup (I mean the data pins, not the power output pins). I cannot have ...
0
votes
1answer
90 views

Using Wiringpi in crontab to control GPIO pins on RaspberryPi

I am trying to create a cronjob, which sets the GPIO pin 10 to high at a given time. I am using the crontab of the default user "pi" and have verified, that the command gpio -g write 10 1 works ...
0
votes
1answer
54 views

Is there any way to read/get pin mode using python (and wiringPi) [closed]

I have a database with table pins with atributes pinNo, pinMode and pinState. I'm trying to read these raspberry pi's atributes using wiringPi in python script, and to write that data into the table ...
3
votes
1answer
157 views

Using WiringPi with Jasper (voice recognition)

I am using Jasper. The voice control part works, however the function I call when a certain word is said, does not. I'm trying to control a robot, sending high signals to certain pins on an L293D ...
0
votes
1answer
83 views

Python GPIO not reading inputs

Using a very simple input script to read a button press, Python GPIO isn't reading high when the button is pressed. The wiring is correct - I have checked it using wiringpi readall. Rpi. GPIO has ...
0
votes
1answer
261 views

2004-LCD with PCF8574-I2C and wiringPi (Python)

I try to interface my 2004-LCD display with wiringPi (in Python 3). The display is connected to a PCF8574-chip, so I need to use I2C. This is my test code: import wiringpi2 as wiringpi ...
0
votes
2answers
63 views

pwm fan on pin 18 help!

Can someone help me? I'm trying to control a fan using PWM and I cannot work out how to do it. This worked for a short amount of time and then stopped working. According to the docs, GPIO pin 18 ...
1
vote
2answers
64 views

Is it normal when a pin goes low it triggers a interrupt on an another one?

I have the following : Output Pin 17 (wiringPi pin number 0) to a relay module -> a LOW means the relay will let current pass. 5V pin to power the relay module Input Pin 22 (wiringPi pin number 3) ...
2
votes
2answers
329 views

How can I use a usb barcode reader with my raspberry pi

I want to get a WCR3237-700 ID Tech USB card reader and attach it to my raspberry Pi. The end goal is to use it to unlock a magnetic lock (when the correct card.) I am currently running PHP scripts ...
1
vote
0answers
72 views

Increase Performance of 4x4 LED Matrix (Multiplexing with pi4j)

I have coded a Display-Class to drive a X by Y LED-Multiplexing-Matrix with pi4j. However, I when driving a 4-by-4-Matrix I cannot get the framerate beyond roughly 30 fps, which still produces a ...
1
vote
1answer
579 views

How to read Wiegand card ID?

I need a simple script that outputs ID of presented card in console. I tried a lot of opensource code that based on WiringPi library, e.g. Pidoorman, its forks by Kyle Mallory and E.J. Dyksen, RFID ...
0
votes
1answer
116 views

GPIO HW PWM @ 143Hz and 20-80% duty cycle, with WiringPi's gpio utility

I've tried to find the solution from other threads but they all seem to miss the point to a certain degree, usually going into kHz and MHz, or into the SW GPIO territory that I don't need. I have a ...
-1
votes
2answers
472 views

using wiringPi and bcm2835

i am trying to make an aplication where i integrate rfid reader and an LCD, i have acomplished this by two different libraries, wiringPi for LCD and i found a library called rc522 for the rfid. and ...
1
vote
1answer
45 views

AdaFruit PiPlate(LCD+Keys) + PWM port + DS18B20 temp sensor

I would like to know if it is possible to use at the same time, the Adafruit LCD+Keys + the PWM port(to control a MOSFET) + one temperature sensor (DS18B20) and its oneWire protocol? I was concerned ...
1
vote
1answer
298 views

How to set a fixed Frequency and change duty cycle from 0 to 100 in Raspberry Pi hardware PWM? [duplicate]

I am trying to control a fan using Raspberry Pi. For that I tried to use the PWM pin in raspbery Pi. I am using Qt C++ to control the fan. I installed the wiring Pi and run the Wiring pi using command ...
2
votes
1answer
659 views

WiringPi: using interrupts with Python

I want my RaspberryPi to perform some actions when the light in a room is switched on or off. To do so, I connected a photocell to the GPIO pins. Previously, I used some python 3 program that queried ...
0
votes
1answer
314 views

wiringPiSetupSys - input pin state does not change

I try to port my GPIO project from quick2wire to WiringPi. My aim is to read the state of a photocell connected to pin 24 of my raspberry pi (model B, revision 2). My code (python 3) looks like this: ...
1
vote
0answers
332 views

GPIO23 (BCM) is busy when using /sys/class/gpio but I am able to use wiringPi pin 4 (GPIO23)

I'm having a bit of trouble accessing GPIO23 using /sys/class/gpio/. To clarify a few terms (according to the table on this page): Header pin 16 is BCM GPIO 23, which is wiringPi pin 4. Header pin ...
0
votes
1answer
232 views

How can I get an SPI ADC (MCP3002) on RPi2

I would be happy if you give me a advice or show me the sample code. One year before, I wrote a luminosity sensor application on my RPi model B in Ruby. Thanks to the this library I could make app ...
1
vote
1answer
2k views

How to run 2 servos with wiringpi2 on Raspberry pi 2

Hello I want to use 2 servo with different gpio pins. But Raspberry has one hardware pwm (GPIO 18). first of all I tried another pin to run servo and my code: wiringpi.pinMode(18,2) ...
4
votes
2answers
263 views

Cannot open 12V Solenoid Valve

I am a beginner in DIY electronics, and I am attempting to control a 12V Solenoid valve from a Pi B2 connected to a 12V Battery and WiringPi Pin 1. I am using a 1kOhm Resistor between the gpio pin ...
0
votes
1answer
58 views

Infinity cascade IO expand module [closed]

Has anybody used Infinity cascade IO expand module for Raspberry PI? Like the one described here http://www.bananapi.com/index.php/purchase/2-uncategorised/36-banana-pi-io-extend-board, but only red. ...
2
votes
3answers
755 views

Can we determine the mode of a GPIO pin?

As I understand it, the mode of a GPIO pin can be INPUT or OUTPUT (and I think there may be other modes such as PWM and I2C). I believe that the mode of a pin is a global and that if two applications ...
1
vote
1answer
246 views

How do I access the Wii Nunchuck using WiringPi

The Wii nunchuck is an I2C accessible device and can be wired to the I2C pins of a Pi. How do I read the data from a Wii nunchuck in C using the WiringPi library?
1
vote
1answer
669 views

WiringPi Interrupt Problem

I'm trying to get interrupts working on the Raspberry Pi using the wiringPi library. When using INT_EDGE_RISING the code below results in very few interrupts when operating the button. This is ...
1
vote
1answer
1k 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 ...
5
votes
2answers
612 views

RaspberryPi to Arduino (Leonardo) avoiding latency

I'm using a Python script via (TKinter)on the raspberryPi to capture mouse movement and events. My goal is to send this data, in real time, to another connected Arduino device(Leonardo). My first ...
1
vote
1answer
37 views

Logic State non-responsive

I need the raspberry Pi to respond to some buttons. I'm writing this in Pure C, using the wiringPi library. As such, I thought it prudent to use the gpio utlitily to make sure my pins were sane ...
2
votes
1answer
228 views

Small voltage on GPIO output

I tried using the wiringPi GPIO library just to test some basic IO, but when I tried to output HIGH on a pin (GPIO 25) the voltage only went from 0V to 0.03V, is this normal? If this is normal ...
1
vote
1answer
1k views

Controlling a servo with hardware PWM using wiringPi

I tried controlling the servo with softPwm using the wiringPi Library but this made the servo stutter. Therefore I want to use the hardware PWM pin on the Raspberry Pi (GPIO18) with the wiringPi ...
4
votes
1answer
1k views

100% processor usage with WHILE loop in Raspberry Pi

I am using wiringPi Library and using this library to read data from GPIO Pins attached to a PIR Sensor. I am using a while loop which reads input data. If there is a motion it will print motion. ...
8
votes
3answers
17k views

Control Hardware PWM frequency

I'm using the hardware PWM output with wiringpi. It provides the function pwmSetClock that should make it possible to change the frequency. ...
4
votes
1answer
2k views

Read the value of an GPIO output pin

I've made a program using the wiringPi library that assigns GPIO pins to toggle at the press of associated number keys. I'd like my program to show the current status of the pins, even if they are ...