Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

Filter by
Sorted by
Tagged with
1
vote
1answer
48 views

Setting Pull Up/Pull Down mode doesn't work (mostly)

I can't seem to set the pull-up resistor mode on the PI4 with most methods I try. I have tried: C# (the new System.Device.Gpio interface), WiringPi (using a C# abstraction), and wiringPi command line ...
2
votes
1answer
142 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 ...
0
votes
1answer
391 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
1answer
329 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....
3
votes
1answer
180 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 <...
0
votes
1answer
414 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
0answers
32 views

using Pi Zero W GPIO relay control

I am trying to control my relay with Raspberry GPIO. Using the terminal to write to gpio5 (Physical 18, BCM 24) works: gpio mode 5 out gpio write 5 1 Trying to do the same in my c++ code doesn't ...
1
vote
2answers
76 views

Wiring Pi Issue - #!/bin/bash vs #!/bin/sh

I am working on a project and have an application shell script. For function part, I need the GPIO access, and for that, I am using the standard wiringpi package. The issue I am getting is with the #...
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 ...
2
votes
1answer
130 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 (...
0
votes
1answer
44 views

How to use at the same time 2 hardware pwm in wiringpi

I need help to configure 2 hardware PWM channels. I am developing device, and sometimes I will need active 2 PWM channels with different frequencies (frequencies is low: 410 and 580 Hz).I'm writing ...
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 ...
0
votes
2answers
1k 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
1answer
33 views

How rpi3 as slave use i2c with wiringPi

I tried to let my rpi3 with wiringPi as slave to receive data from master and data +1 send to master . mater send 1 to slave (rpi3) My rpi3 SDA is GPIO 18 ,SLC is GPIO 19 the code on my rpi3 : #...
1
vote
1answer
489 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, ...
0
votes
2answers
544 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
528 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 ...
1
vote
1answer
46 views

How can I require root privileges for invoking 'gpio' from WiringPi?

I removed my user from the gpio group, logged out and back in. I can still run e.g. gpio write 25 1. I see from this answer how the memory mapping and permissions changed between Jessie and Stretch, ...
0
votes
2answers
879 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 ...
2
votes
2answers
7k 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) wiringpi....
21
votes
3answers
68k 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. (https://projects.drogon.net/raspberry-pi/wiringpi/functions/...
1
vote
0answers
53 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 ...
2
votes
2answers
183 views

What is the correct way to use /dev/gpiomem with mmap to get access to Raspberry PI3 peripherals

I'm implementing a pascal library to deal with RPI3 peripherals. My goal is to control GPIO pins' functions, pins' logical levels, pins' pull resistors, I2C and PWM, at least. To achieve this I'm ...
0
votes
2answers
13k views

how to read output of gpio readall

I never used wiringpi library before. I'm trying to understand how to read the output of gpio readall. What are the BCM and wPi columns? What does ALT0 mode mean? I searched online for output ...
0
votes
3answers
268 views

Input on GPIO at very Fast Speed

I am getting a signal at 1 GPIO which i need to read at an interval of exactly 10^ (-6) seconds. I am using wiringpi.h in C and the issue is that digitalRead() also takes some time thus i am not able ...
3
votes
1answer
482 views

Cross compiling for RPi - error while loading shared libraries

I'm trying to compile a simple program on my Ubuntu using the ARM cross compile toolchain (arm-linux-gnueabihf-gcc) and run it on my Raspberry Pi. The program is using the wiringPi shared library (...
0
votes
2answers
99 views

Connecting multiple DHT11 sensors using WiringPi and C

For my internship I need to get measurements of multiple dht11 sensors and send them to a database using a REST API. I decided to go with WiringPi and C. I followed this tutorial: http://www....
0
votes
1answer
76 views

Wiring Pi - BCM 20 works with a button, but not BCM 21 :-(

I have two switches (buttons). Red is connected to physical pin 38 (BCM 20) and green to physical pin 40 (BCM 21). I call wiringPiSetupGPIO() it returns 0. When I use pullUpDnControl(redSwitch, ...
1
vote
1answer
72 views

GPIO not fast enough for RF transmitter?

I'm trying to control a 315MHz RF socket using the RCSwitch library. I tested with an Arduino and it worked 100% of the time but when porting over to a pi zero I can only get it to correctly turn on / ...
0
votes
1answer
87 views

Python RPIO.ChangeDutyCycle() Equivalent in WiringPi (C)

I'm currently developing an application with the WiringPi library. I have implemented a prototype in Python, and I'm currently trying to reproduce the same behaviour in C++. However, I ran into some ...
1
vote
0answers
409 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 ...
0
votes
1answer
116 views

Adafruit 16 Servo Hat

I am new to Raspberry Pi and Linux so sorry for the basic questions. I am utilizing the Adafruit 16 Servo hat for the Rasperry Pi. The Hat utilizes I2C. I am programming in C and have had difficulties ...
0
votes
1answer
193 views

Why is WiringiPi unable to find hardware revision?

I installed Ubuntu 18.04 on a Raspberry Pi 3 B+ and WiringPi following the instructions presented here. The problem is that when calling the GPIO utility, I get the following error: It seems that the ...
1
vote
0answers
62 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
1answer
1k views

16 channel relay module does not respond to write 0/1 (GPIO.HIGH/LOW) commands

I have received a 16 channel relay module and I'm trying to drive it through my Raspberry Pi. I have connected a 12V power supply to the DC+/- of the board as well as the 2x +5V and 2x GND on the ...
-1
votes
1answer
1k views

Serial Port & C Code

I have a sensor connected to an ODROID UART (Basically an RPi just a different name for the UART port) and using the WiringPi Serial library. I am able to echo/cat to the sensor via two terminal ...
0
votes
1answer
170 views

GCC and makefile on Raspberry Pi running NOOBS deletes my c file

I am having an issue with my pi where I run gcc or make from the terminal and my main c file included in the compilation is deleted. I am using the wiringPi library to communicate with some sensors ...
0
votes
1answer
52 views

Can't trigger GPIO control via executable run through php's exec function

/var/www/html/index.php <?php exec("./on"); shell_exec("/var/www/html/on"); on.cpp #include <string> #include <getopt.h> #include <cstdlib> #include <sstream> #include &...
1
vote
1answer
206 views

How to access to I2C software with wiringpi library-

I want to use I2C software instead hardware I2C. Because a buggy parto of the I2C related with clock stretching. I can enable in boot.txt adding this: dtoverlay=i2c-gpio,bus=3 It would create a /...
0
votes
1answer
918 views

How to address gpio pins

I'm kind of new to raspberry pi, and I saw a tutorial about making a LED blink. The LED was connected to pin 17, but the tutorial said pin 11. I connected the LED to pin 17, and in the terminal I ...
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
170 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
38 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 ...
4
votes
2answers
4k 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. ...
0
votes
1answer
48 views

RaspberryPi getting error after reading some serial Input, using rs232 and C Language

my raspberry keep getting error after reading some serial input, like this: i'm using Library wiringPi with this sample code: #include <stdio.h> #include <string.h> #include <errno.h&...
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
132 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
2answers
76 views

How to find out whether GPIO is HIGH (without RPi.GPIO module)

I was wondering if there is a way to find out that a GPIO is under voltage, say - the GPIO is set to HIGH. I need to be able to check this in a linux terminal, using a command or a script that simply ...
4
votes
2answers
3k views

GPIO pins not changing value

I have a raspberry pi zero and I am trying to change the gpio pin values. I tried using RPi.GPIO with python and the gpio command from wiringpi but I am unable to change the value for any of the pins. ...
1
vote
1answer
1k views

Reading Multiple bytes in Raspberry Pi over I2C using Wiring Pi library [closed]

0 down vote favorite I am trying to build one sensor interface using Raspberry Pi over I2C. I have installed WiringPi. I am seeing limitations of wiringPi library, that supports only 1 or 2 bytes I2C ...