Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

34 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
3k 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 ...
3
votes
1answer
174 views

Can't find out why my program won't read analog values (Using MCP3004)

I am using wiringPi and C. I have a flame sensor and a MCP3004 ADC. Here is the program that I wrote, but I can't figure out why it won't read the analog values from the flame sensor. #include <...
3
votes
0answers
780 views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
3
votes
0answers
3k 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 11 ...
2
votes
1answer
85 views

pwmWrite() does not change dutycycle immediately

I'm using wiringPi for PWM on BCM18. I tried to use this to generate a STROBE-equivalent signal to turn ON the LED for the Camera Capture. My intention is to synchronize the LED-ON to shutter opening (...
2
votes
1answer
110 views

Export GPIO pins from extender

I have PCF8574 GPIO extender connected to RPi. I use GPIO Sysfs. It is possible to write/read to/from extender pins, using command like this: gpio -x pcf8574:352:32 read 358 But i can not export ...
2
votes
0answers
2k views

pilight send raw code [433MHz]

I have set up a 433Mhz receiver and sender at my raspberry pi using pilight in order to remote control a power socket (Flamingo FA500S). Unfortunately, this one is self-learning and therefore not ...
1
vote
0answers
35 views

Interrupt issue - Wiringpi and pigpio show different values for pin

I am having an issue with raspberryio/wiringpi interrupts. A lot of extra interrupts are generated. My configuration is as follows: Physical pin 16: Set as input Pulldown resistor Interrupt ...
1
vote
0answers
264 views

Access Timer Interrupts in Raspian

I want to write a C program that runs some code at a fixed interval (somewhere between 200us and 1ms, TBD). Is it possible to use the hardware timer interrupts to execute code without resorting to ...
1
vote
0answers
51 views

Adafruit Ultimate GPS with Rpi 3 “Permission Denied”

I am trying to connect an Adafruit Ultimate GPS to my Raspberry Pi 3 and read data from it using the WiringPi Serial library. I have set the serial connection up and removed the serial console through ...
1
vote
0answers
130 views

WiringPi install using npm fails

I'm having a hard time installing the wiring-pi node package. It fails on the step "Making wiring-pi ...", spaming the terminal with build errors. If I clone and install wiring-pi manually as ...
1
vote
0answers
37 views

Raspberry-pi read data from thermometr

I am newbie at raspberry. I have raspberry Raspberry Pi Details: Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony * Device tree is enabled. *--> Raspberry Pi 3 Model B Rev 1.2 ...
1
vote
0answers
109 views

DRV2605 + TCA9548A I2C Multiplexer gets sporadic “Remote I/O Error”

The setup is a raspberryPi driving two AdaFruit DRV2605s through an AdaFruit TCA i2c multiplexer and it all works correctly the bulk of the time. I adapted the sample Arduino code and by and large we'...
1
vote
0answers
148 views

WiringPi can only turn on 8 LEDs

On my RPi 3 I have a PHP website to control 10 LEDs. Each is wired to a separate GPIO pin and 220 ohm resistor. Here is the code: <html> <head> <title>LED Control</title>...
1
vote
0answers
3k views

PWM with wiringPi library and C in order to blink an LED at a given frequency

I am working with the wiringPi library with C on a Raspberry Pi 3 Model B and attempting to understand and develop a model so that I can predict the blinking behavior of an LED connected to GPIO #18, ...
1
vote
0answers
222 views

How to configure MAX11647

I am using this i2c 10 bit ADC for temperature sensing and battery level sensing with the Raspberry Pi. What is the correct way to configure this device? I tried writing the values 0x82 to the setup ...
1
vote
0answers
282 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 ...
1
vote
0answers
306 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 ...
1
vote
1answer
456 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, ...
1
vote
0answers
280 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 ...
0
votes
1answer
300 views

Reading multiple channels from a pcf8591 ADC

I am writing a little "oscilloscope" program in c++ using /dev/fbx. I am reading in analog values via a pcf8591 connected to the I2C bus. Every thing works well if I only read 1 channel of analog data....
0
votes
1answer
331 views

Unosquare.RaspberryIO: unregister from InterruptCallback

I'm developing an application on C# using Unosquare.RaspberryIO. My question related to interrupts and callbacks. According to the documentation, it's possible to register callbacks. For example: pin....
0
votes
2answers
933 views

Compiling a C program latest version of wiringPi

System: RPi 3 B OS: Ubuntu 16.04 Mate desktop. Uninstalled pre-installed v2.32 wiringPi package. Downloaded latest version from the wiringPi site. Ran build. The build worked; gpio ...
0
votes
0answers
405 views

Toggling LEDs on/off using the wiringPi library and threads

I'm following the instructions at http://wiringpi.com/reference/priority-interrupts-and-threads/ using the PI_THREAD and piThreadCreate(myThread) methods and cannot get the LED(s) to blink. Here's the ...
0
votes
0answers
149 views

How to read data from PIR sensor which is controlled by relay i2c?

There are my first steps with RPi and i2c. I use expander pcf8574 and I would like to drive a relay to control LED and PIR sensor. When the state on sensor is HIGH, LED should be turn on. I wrote a ...
0
votes
0answers
361 views

How could I write a C function using the wiringPi SPI library to read the X and Y measurements from this 2-axis inclinometer?

How would one use the wiringPi SPI library (http://wiringpi.com/reference/spi-library/) to get the x and y readings from this SCA100T inclinometer? I understand that the function wiringPiSPIDataRW() ...
0
votes
2answers
767 views

wiringPiISR() edge detection

Does wiringPiISR() set up Synchronous or Asynchronous edge detection and are inputs e.g. pinMode( , INPUT) set up with hysteresis (Schmitt trigger)? All of these seem options in the Pi GPIO ...
0
votes
0answers
341 views

Linx GPS UART communication using wiringPi

I have a Linx RXM-GPS-R4-x GPS module that uses the UART pins on the Raspberry Pi 3 model B's GPIO pinout. I'm also using the wiringPi's serial library. However, I'm having difficulty with ...
0
votes
0answers
134 views

wiringPiSetup() hangs system

My Pi user is a member of the group "gpio". I have a C++ programm calling "wiringPiSetup()". Whenever I forget to use sudo, my Pi is not reachable anymore and I have to do a power cycle. I know that I ...
0
votes
2answers
491 views

WiringPi, PHP: Interrupt driven event counter

I am planning to set up an HTML-PHP website gui which opens up in Chromium Kiosk mode. I want the gui to count the number of falling edge interrupts and show the count on the GUI. I have achieved ...
0
votes
1answer
390 views

Does the run pin p6 pin 2 connect to ground

I already know that the run header resets the Pi. My question is does one of the pins lead directly to ground? I would like to use a common ground on the GPIO pins and connect it to the run pin 1. Is ...
0
votes
1answer
476 views

How to install wiringPi in Matlab Simulink for interface Raspberry Pi with ADC?

I like to use IC MCP3008 to change analogue signal to digital signal for Raspberry Pi interface with Matlab Simulink. But I getting the error missing file wiringPi.h and wiringPi.c. May I know how can ...
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 ...
0
votes
3answers
1k views

Linking WiringPi library in CMakeLists

So, I have a C++ program that I've compiled with CMake and uses the OpenCV library which I'd like to integrate with wiringPi so I can use functions like digitalWrite(), digitalRead() etc... Before I ...