Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

Filter by
Sorted by
Tagged with
1
vote
0answers
28 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
1answer
65 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
90 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
2answers
121 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
34 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
103 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
38 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
56 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
55 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
62 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
291 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
424 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
151 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
599 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
114 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
75 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
113 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
505 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
225 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
65 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
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
187 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
63 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
226 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
77 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
193 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
39 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
52 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
143 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
77 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
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 ...
0
votes
1answer
338 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
213 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
414 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
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
0answers
556 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
2answers
1k views

WiringPi Library and PCA9685 throwing errows

I am using this example code PCA9685 in C and whenever I run the code I get this as my output: PCA9685 servo example Connect a servo to any pin. It will rotate to random angles pwmWrite: You have ...
-3
votes
2answers
77 views

Can somebody please tell me how to wire this?

I litterally cannot find it anywhere on how to wire this https://www.adafruit.com/product/2934 The only thing any of the pigrrl schematics show is connecting wires from b1,2,3,4 to pins on another ...
0
votes
0answers
186 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
499 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() ...
1
vote
1answer
697 views

What does Pin Base mean in WiringPI Library?

I cant seem to find a clear answer what "pinBase" does. Does anyone have an idea what it does? Thanks! Code node = wiringPiNewNode (pinBase, 8) ; Function struct wiringPiNodeStruct *...
0
votes
2answers
517 views

DAC MCP4725 not working with raspberry

I am using raspberry pi 3. I am trying to run the AC induction motor for that I want an analog pin. In raspberry pi model doesn't have an analog pin. All pins are digital IO pins. So I have tried MCP ...
3
votes
1answer
152 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 ...
1
vote
0answers
626 views

How to Read LDR Input with Raspberry Pi's GPIO Pins in C? [closed]

Using an LDR and the below circuit diagram, I am trying to read the amount of light that the LDR is receiving. My primary goal is to detect a change when an object passes over the LDR to trigger an ...
1
vote
1answer
378 views

How can I use Garage Door Safety Sensors with Raspberry Pi?

I am trying to use garage door safety sensors as a way of counting cars. From my understanding, if there is no object (car) between the sensors, then they output a 3.3V signal every 6 milliseconds. If ...
1
vote
3answers
3k views

wiringPi.h: No such file or directory #include < wiringPi.h>

When I try to compile I get this error: fatal error: wiringPi.h: No such file or directory #include < wiringPi.h> ^ The code is: My includes are: #include < ...
1
vote
1answer
977 views

Can't access GPIO pins directly from C++ with wiringPi

I'm trying to access the GPIO pins of a Raspberry Pi 3 model B directly from c++. This code works fine with wiringPiSetup() and wiringPiSetupGpio() but I want to access the GPIO registers directly ...
0
votes
2answers
930 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 ...
1
vote
1answer
707 views

Wiring Pi - Root not required?

I developed some code using wiringpi on a 4.4.21 machine (Jessie) - it worked fine and as expected, required root privilege to run (i.e. requires sudo) - it uses wiringPiSetup(). I moved the code ...
0
votes
0answers
391 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 ...