Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

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

Wiegand wiring guidance on Pi 4 with voltage step-down

Ok so following on from my previous post here. I have decided to start with the Wiegand wiring interface. I've drawn a diagram below to illustrate how I plan to wire everything up. Would appreciate if ...
0
votes
1answer
57 views

Using WiringPi with more than two chip selects and MCP3008

I am trying to get more than two chip selects available on the Pi. I have the devices present, but am struggling to read a MCP3008 when the CS is plugged into the additional GPIO pins. My end goal is ...
0
votes
1answer
81 views

How fast are C & Python libraries

I ran some code to monitor Pi hysteresis which involved mirroring a GPIO input to output. I was surprised as how slow the code was, so wrote a C version. Although this was slightly better it was still ...
0
votes
1answer
75 views

wiringPi compile issue on RPi 4B 64bit

I am trying to compile my C++ project using CMake. My Raspberry Pi OS does include /usr/include/wiringPi.h and all the required .so files in /usr/lib/. Here is the output of gpio -v command: gpio ...
-1
votes
1answer
54 views

Access Multiple I2C Ports on Raspberry Pi CM4

I am working on the Raspberry Pi Compute Module 4. I would like to implement the 2 I2C ports for the 2 different types of sensors. (must be accessed within a single application) I am using the I2C ...
0
votes
1answer
36 views

WiringPi INPUT causes voltage below nominal 3.3v on pin with pull-up

Libs: wiringPi Hardware: Pull-up resistor (10k) to 3.3v on GPIO 24 (=THERMO_BUTTON_PIN) floating GPIO 4 (=AUDIO_BUTTON_PIN) In short, I want to implement an auto-recognition for one of two ...
-1
votes
1answer
52 views

How to toggle RPi GPIO without system call

I want to toggle GPIO from within my C application, and be sure that it won't call kernel functions. Is wiringPi a good solution to do that, or should I do it another way?
1
vote
1answer
196 views

multiple UARTs on the 40-pin

i am trying to connect two devices via UART to a raspberry 4. one being a stepper driver (i dont need much throughput), one being an image sensor (the higher the baud rate is i can get, the better). ...
0
votes
1answer
174 views

fatal error: wiringPi.h: No such file or directory

Learning cmake for use with CLion. I have a raspberry pi project and I'm trying to bring in wiringPi library on my Ubuntu box. Here's my build results. ====================[ Build | rookery_exe | ...
0
votes
1answer
54 views

Raspberry Pi: How to check I2C Bus Busy Status in Multi-Master mode

I am working on the Wiring Pi I2C Example codes. In my case, I am using the 2 masters over the same I2C Bus. I am getting some errors like 0x00 + Missing ACK/NAK Even the Clock pulse is not in 50% ...
0
votes
0answers
18 views

Noise on interrupt pins while using Hardware PWM

i have been using the RPI4 to control 2 brushless motors with encoders, using 2 PWM signals to the motor driver, and reading both 3.3 V encoders(2 channel resolvers each) using interrupts. If i move ...
1
vote
2answers
53 views

How to check if wiringPiSetup() was run

I am working on a C++ project using several objects that use wiringPi. When I initialize the objects each runs wiringPiSetup() in their constructor. If I test the objects individually all o them work. ...
2
votes
0answers
36 views

magnetic field generated by the engine alternator affects gpio value

I am working on a dashboard for a motorcycle. I created a Qt application on my raspberry pi 4 on a raspberry pi os lite. I have configured one of my GPIO as interrupt using the wiringPi library. ...
0
votes
1answer
63 views

WiringPi SPI without Chip Select/Enable?

I am wondering how the WiringPi SPI works without using the chip select/enable spi.cs_change = true; in the following code. int wiringPiSPIDataRW (int channel, unsigned char *data, int len) { struct ...
0
votes
1answer
151 views

How to read SPI memory with raspberry pi? (using wiringpi)

This is the pinout I have for the flash memory W25Q128FV which I'm trying to interact with I'm trying to control it with a raspberry pi 3 B+. Here's how I wired everything: CS - GND D0 - SPIMISO WP - ...
0
votes
0answers
95 views

How to use 4 CS for SPI in C++

I'm currently trying to implement 4 CS in RaspPi. I'm still a newby in this field and used the library wiringPi. For CS0 and CS1 this works totally fine. However now I have 2 more CS on the GPIO Pin ...
-1
votes
1answer
210 views

Raspberry Pi Software Driven servo control with PWM using C and Wiring Pi LIbrary

I'm trying to get my raspi zero to move an SG90 PWM driven servo. I have achieved this with python already using the gpiozero library, so I know my hardware works but I am trying to do it with C using ...
1
vote
4answers
2k views

GPIO pins not changing state

I have Raspberry pi 4B, and I want to interact with the GPIO pins. I connected simple LED wiring to physical pin's 37(GPIO25) and 39(GND). After exported pin, and set up mode to "out", I ...
1
vote
2answers
1k views

GPIO not working on Raspberry PI 4 4GB

I have a RPi 4 running Raspbian with the Ubuntu Mate desktop environment, whenever I try to use the Wiring Pi library through a C script, to doesn't work at all. On using the gpio readall command I ...
1
vote
0answers
49 views

Rotary encoder working on Pi 3 but not on Pi 4

I'm trying to read an encoder switch using wiringPi (latest, 2.52). Whenever there is an edge on either of the encoding pins a or b, I store a snapshot of the state of both pins on two bits: int val = ...
1
vote
2answers
1k views

wiringPi.h not found by gcc. Works in Raspian, not Ubuntu Mate

This is my first time posting on stack exchange so I apologize if this is too much or not enough info on the problem. A few months ago I installed Ubuntu Mate 18.04 on a Raspberry Pi 3B+ and tried to ...
1
vote
1answer
457 views

how to use MCP23S17 pin expander via SPI

I'm working on a custom sensor that is wired to a couple of MCP23S17 gpio expanders, which are in term connected to a Raspberry Pi 4 via the SPI pins i.e. SPI_MOSI, SPI_MISO, SPI_SCLK and CE0 pin. I'm ...
2
votes
1answer
2k views

Enabling of I2C-0 via "dtparam=i2c_vc=on" on Pi 3B+ causes "I2C-10" & "I2C-11" to appear and disables GPIO 10 GPIO 11

For reference: I am using the latest release Pi OS Lite, Aug 2020 version. I am developing an application using Pi4J. I am referring to pins via this Pinout: https://pi4j.com/1.2/pins/model-3b-plus-...
-2
votes
3answers
143 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 ...
1
vote
0answers
161 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
26 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
185 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
186 views

Output resistors and GPIO

I am planning to control a IC (CD74HCT299E). 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
200 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
528 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
2k 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
24 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
31 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
133 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
173 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
114 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
67 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
1k 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
2k 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 ...
3
votes
4answers
2k 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
164 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
607 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
315 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
votes
1answer
150 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
247 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
215 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
2k 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
3k 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
436 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
2k 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 (...

1
2 3 4 5