Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

Filter by
Sorted by
Tagged with
-1
votes
1answer
34 views

Where the heck is WiringPi? [closed]

I was trying to run a program at boot, and whenever I tried it never found the wiringpi module. daveofeves told me try and use the exact file path, but I looked in literally every file on my pi and ...
-2
votes
3answers
59 views

says i don't have wiringpi module when runing code at startup

I have a code set up to run at boot, and it works fine when I start it via terminal, but it doesn't run at boot. I opened the terminal, and this is what I saw: Running at boot Traceback (most recent ...
0
votes
0answers
40 views

I2C, SPI and Python Libraries with Raspberry Pi 4b

I've been working with RPi.GPIO so far but I have had issues with PWM and edge detection, which are well known issues with RPi.GPIO, anyway, after some research I'm considering using a different ...
0
votes
0answers
17 views

Can't get to toggle leds with WiringPi library in C

So I got my python code to run that basically just toggles the LED, but now I tried enabling the GPIO via WiringPi library in C but it doesn't work. Considering python code runs, there isn't really ...
0
votes
3answers
43 views

libpgiod vs wiringPI code/configuration

I have an RPI, setup with wiringPi and some code I wrote to read a quadrature encoder. It works just fine, I can read the pins, using a wiringPiISR mechanism (the ISRs get executed on the rising as ...
2
votes
2answers
48 views

Output resistors and GPIO

I am planning to control a IC ([CD74HCT299E][2]). I have currently GPIO-pins directly hooked up to the IC. My Question is, does the Raspberry pi have resistors before the GPIO-pin, or do I have to or ...
1
vote
1answer
55 views

Running pump & servo - Relay needed?

simulate this circuit – Schematic created using CircuitLab So I am working on a project that will require both a servo motor plus a small water pump. Both run on 3.7 -6v and I am going to use ...
2
votes
1answer
58 views

How to write 16 bit data to device address using the i2c wiringpi lib

I am trying to write 16 bit data to i2c device . As there are no registers specified to write to the slave device, I am not able to use the built-in wiringPiI2CWriteReg16 Api. Can some one guide me ...
0
votes
0answers
133 views

gcc and g++ compilers don't find wiringPiSetup() and wiringPiI2CSetup() functions

Update/solution: The sample program(s) Gordon refers to are at github/wiringPi - specifically for me lcd-adafruit.c. On my Rpi, the correct libraries are in /usr/lib and are libwiringPi.so and ...
1
vote
0answers
18 views

How do I hold SPI high value?

I'm using wiringPi spi library to communicate two raspberries. As the spi clks aren't synchronised, I don't read the high values, since they are only a pulse. Is there a way to hold the high value ...
1
vote
0answers
19 views

Controlling PWM by wiringpi through python programming [closed]

Can anyone give me the program for controlling PWM by wiringpi through python programming? I have already searched on the net but could only find program through C programming.
0
votes
0answers
57 views

Initializer element is not constant serialOpen WiringPi

I'm getting an error when trying to run some code on my raspberry pi. Here is the source code: /* SimpleReceive This sketch displays text strings received using VirtualWire Connect the Receiver data ...
0
votes
0answers
59 views

Can't read data from PN532 NFC reader over SPI

I'm using Pi4J library to read data from a NFC reader based on PN532, connected to my Pi via SPI. However, I don't seem to receive any data from if when I put a NFC card to my reader. I'm using SPI0 ...
1
vote
1answer
71 views

Crontab with WiringPi

I want to change pin state at certain time with Crontab. I tried to use this command: 7 0 * * * /usr/bin/gpio -g write 0 0 but it returns me this error: bash: 7: command not found I also tried: 7 0 * ...
1
vote
0answers
36 views

Changing speed of a stepper motor break the rotation smoothness?

I'm using node-stepper-wiringpi with the L298N driver (12V) to control a stepper motor. If i put a speed of 30 the rotation is smooth but if i put more than 30 the stepper struggle to make the ...
2
votes
2answers
362 views

GPIO pullups not working?

Sorry for the very basic question. I am trying to set a built-in pullup on GPIO pins and it doesn't seem to be working. Hardware is Pi 3B and 4B (I tried on both), OS is Raspbian 10 (buster). The ...
1
vote
1answer
880 views

WiringPi and ADS1115 C/C++ sample programs

I am trying to create c++/c program to AnalogRead using and ADS1115. I have seen that wiringPi has support for ADS1115 but i could not find any sample program to start with. Can anybody link guide me ...
1
vote
3answers
732 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 ...
0
votes
0answers
74 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
308 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
1answer
128 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 : #...
0
votes
1answer
98 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 ...
1
vote
1answer
112 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, ...
1
vote
0answers
127 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
863 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
3answers
1k 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 ...
2
votes
1answer
293 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 (...
3
votes
1answer
1k 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
187 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....
1
vote
1answer
99 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
237 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
824 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
2answers
408 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
81 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
votes
1answer
2k 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
256 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
98 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
450 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
97 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
0answers
248 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
45 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 ...
0
votes
1answer
76 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&...
1
vote
0answers
182 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
107 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 ...
1
vote
1answer
2k 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 ...
0
votes
1answer
420 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
255 views

WiringPi shiftOut with HCF4094 shift register

I have problems getting the raspi/wiringPi to work with a HCF4094 shift register. I am using the following code part: #include <wiringPi.h> #include <wiringShift.h> #include <iostream&...
1
vote
1answer
504 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
2k 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
751 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 ...