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

Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

Filter by
Sorted by
Tagged with
3
votes
1answer
1k views

Cannot read 433Mhz data

My goal is to use a 433Mhz receiver to capture the KlikAanKlikUit (Kaku/CoCo) ID. I have it wired to 5V and GPIO4. When reading up on the subject there are a few tools to capture data and even ...
1
vote
0answers
298 views

Using three SPI channels with wiring pi?

I was wondering if there is a way to use three different channels for SPI through the wiring pi library. I mean I know that a chip/slave/channel select pin can be any pin capable of sending a high or ...
3
votes
1answer
2k views

Printing state of wiringpi pin onto webpage

I have a Pi set up with Apache and wiringpi, and I would like to read the state of an in pin (every 20 seconds, if possible) and display it on my webpage using PHP. The input is to determine if my ...
1
vote
0answers
316 views

Combination of ServoBlaster and wiringPi won't work

I would like to control a servo and a dc motor. I want to control the dc motor's speed by using pwm with a frequency >= 1000 Hz. The servo on the other hand expects a pwm frequency of only 50 Hz. So ...
0
votes
0answers
112 views

Control 434 MHz US remote outlets without spoofing

I'm looking for hardware or a way to control remote outlets using my Pi, which are compatible to US-outlets and without using a spoofer to set it up. I tried to use Etekcity power outlets like ...
2
votes
1answer
872 views

Should some GPIO pins read high from start?

I have a Raspberry Pi 2 Model B. When I power it, with nothing connected to the GPIO pins and the OS still not booted (probably, I checked right after plugging it to the power) some of the pins show ...
0
votes
1answer
530 views

Pin GPIO5 set to output by default with constant 2.4V output during and after boot

I have been experimenting with rpi in the last few days and made a simple user interface circuit, it contains a button and few LED's attached on top of rpi as you can see below. It works fine but the ...
2
votes
1answer
463 views

Raspberry PI Uart: pi to pi communication (B+, B2, CMIO)

Good day I am currently setting up UART communications for two Raspi's using wiring Pi's uart library. I have three Raspberry Pi's (B+, Compute Module IO board, B2). I have been able to make ...
2
votes
2answers
1k views

wiringPi and crosstool-ng

I have a Problem using wiringPi with crosstool-ng. First I got this Error: libwiringPi.so: file not recognized: File format not recognized I think the problem might be that ./build will not use ...
1
vote
0answers
40 views

WiringPi traffic light in C [duplicate]

I am working on a project for my C programming class and need to use wiringPi on my raspberryPi. I need to create a traffic light (like a real one- red to green to yellow to red, etc.) and a ...
1
vote
1answer
7k views

Python: Use SPI with WiringPi

I've been searching google and stackexchange for quite a while: I would like to access an ADC (MCP3201) via SPI, to do so, I have to use Python and would like to use WiringPi. Sadly it seems ...
2
votes
1answer
2k views

Max SPI transfers / sec speed using WiringPi

I'm trying to interface with MCP3002 ADC using SPI and it's working nicely except for the amount of the samples I'm able to collect per second. I'm using WiringPi and the code is very simple: ...
1
vote
2answers
3k views

wiringPi cleanup command

I have some experience with the python GPIO library and am working on porting some of my code to C for better performance. Normally, at the end of programs, or when I break out of them with Ctrl-C, I ...
0
votes
1answer
580 views

Monitor data sent to 74HC595

I'm new to Python and Raspberry Pi, so please bear with me. I would like to intercept the bytes of data being sent to a 74HC595 switch register. GPIO pin 23 on my RPi is connected to the data pin of ...
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, ...
6
votes
3answers
13k views

SPI: Raspberry PI master and Arduino slave

I'm trying to have a Raspberry PI act as a SPI master and send data to an Arduino Nano (one of the cheap clones). I partly succeeded, but I don't get a continuous communication, and some bytes get ...
1
vote
1answer
3k views

PWM - What does pwmSetClock() and pwmSetRange() mean?

I have looked at the WiringPi site and have found: pwmSetRange (unsigned int range) ; This sets the range register in the PWM generator. The default is 1024. pwmSetClock (int divisor) ; This sets ...
0
votes
1answer
865 views

HC-SR04 ultrasonic sensor reading becomes highly unusable when PWM is active

Good day I am trying to sample distance using a sonar/ultrasonic sensor for altitude measurement. When the PWM is not active, the sensor gives accurate measurements in centimeters, however with the ...
1
vote
1answer
563 views

Servo motor using wiring Pi problems

I am looking for solution for something wrong happen in my programme i have configuration for control RC motor over RasPi using Wiring Pi here is code #include<stdio.h> #include<netinet/in.h&...
1
vote
1answer
710 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
505 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
4k 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, ...
2
votes
2answers
2k 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 ...
2
votes
1answer
466 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
553 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
2k 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 ...
5
votes
1answer
3k 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 ...
2
votes
1answer
345 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
1k 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 ...
3
votes
2answers
1k 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 ...
2
votes
2answers
657 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
3k 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
3answers
663 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 ...
1
vote
1answer
526 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 ...
1
vote
2answers
2k 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
391 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
847 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 ...
1
vote
1answer
1k 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
2answers
2k 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 wiringpi....
-1
votes
3answers
729 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
365 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
2k 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
284 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 ...
2
votes
2answers
13k 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 ...
2
votes
1answer
880 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
3k 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
135 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
2k 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
4k 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
2k 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: ...