Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

WiringPi is a C language library for accessing GPIO pins.

0
votes
0answers
8 views

I cannot compile Java code with Pi4J library - java.lang.UnsatisfiedLinkError

I tried to compile Java code on Ubuntu 18.04. I'm trying to use Remote JDK so I can compile on my local computer and then send the compiled code to my Raspberry Pi. But I having som trouble with ...
1
vote
0answers
19 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
25 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
25 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
29 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'...
0
votes
0answers
31 views

Wiring 3 MEMS Mics to a Raspberry Pi Zero

I was following this tutorial to wire 2 MEMS mics to my Raspberry Pi Zero W for stereo recording: Adafruit I2S MEMS Microphone Breakout - Raspberry Pi Wiring & Test After I got this working, I ...
0
votes
0answers
57 views

wiringPi (C) , MCP23S17 , and interrupts

I've enjoyed using the wiringPi C library in various ways. Used it with vanilla GPIO, with its interrupt-handling feature, with MCP3008, MCP23017, and now the MCP23S17. However, I'm a bit stumped on ...
1
vote
2answers
38 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 ...
0
votes
1answer
210 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
67 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
41 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&...
0
votes
1answer
58 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
174 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
55 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
132 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 ...
-4
votes
2answers
53 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
63 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
107 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
121 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
174 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 ...
2
votes
1answer
69 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
0answers
97 views

Error when deploy spring boot application in docker

I have created an application spring boot and successfully run it with the java -jar app.jar command on a Raspberry Pi 3 model B, installed with HypriotOS. But when I run Dockerfile file to deploy ...
1
vote
0answers
219 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
194 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
928 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
599 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
372 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
173 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
167 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 ...
1
vote
1answer
230 views

Parallel/simultaneous read

Is there a way to read more than 1 port pin simultaneously (like a parallel port read) using wiringpi? I can see wiringpi functions to do a single pin read (digitalRead()) - but in my application I ...
0
votes
0answers
31 views

can't execute uart communication

I'd like to execute uart communication but I didn't succeed it. I use raspberrypi2 and the OS is ubuntu14.04. I show the procedure that I executed. [1]I directly connected GPIO14 (Tx (pin 8)) to ...
1
vote
2answers
76 views

Is pinMode necessary in wiringPi programming?

Why we need to mention the pin is for input or output via pinMode. Can I simply use digitalRead or digitalWrite without setup the pinMode in before? In other words, if I set a pin as the output, can I ...
0
votes
1answer
93 views

Unable to get input from RPi3 GPIO serial, crashes when using RX pin

I have a sensor which spits out information via serial and I am trying to receive that input on my Raspberry Pi 3 via the serial RX (BCM pin 15). I'm using the wiringPi library in a C++ program to ...
1
vote
0answers
100 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>...
0
votes
0answers
75 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 ...
1
vote
0answers
43 views

How to determine Gpio write mode [closed]

Hello I'm creating a cgi script to turn on one led (Red) while blue is off and vice versa it's more like a quiz buzzer Here's a code #!/bin/bash ch=gpio read 16 if test $ch -eq 1 then ...
0
votes
1answer
268 views

Rotary encoder is giving less PPR reading

I am testing 400 PPR(Pulses Per Revolution) rotary encoder using code.I am rotating it by using the hand. I have connected Phase A and Phase B and also, ground and Vcc properly. The code is giving ...
1
vote
0answers
1k 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, ...
0
votes
0answers
74 views

GPIO command in PHP works locally, but not remotely (Apache2)

It's basically just a simple exec("gpio write 15 1"); command. The script below works fine on my rpi3 in Apache2. But it doesn't work, when I try to execute it from my remote host. I'm trying to run ...
0
votes
1answer
65 views

help reconstructing blinking LED circuit that required GPIO #17 pin low rather than high

I am working through a series of lessons on using the Raspberry Pi 3 Model B with the Osoyoo Raspberry Pi Starter Kit. The first lesson is to build a simple circuit in which GPIO #17 is used to power ...
0
votes
1answer
354 views

wiring pi gpio - no output

On a standard Raspberry Pi Zero W, with Debian Jessie, I have no problem using the Wiring Pi GPIO command line utility. Wiring Pi was installed using git, following the Wiring Pi website's guide. Now,...
0
votes
2answers
292 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
2answers
170 views

When to set internal pin resistance at software layer

I'm trying to wire my Raspbery Pi 1 Model A (hereafter RPi) to a simple 6VDC buzzer and here is my best attempt: So the 3.3V power pin from the RPi is connected to the breadboard's top-most rail via ...
0
votes
1answer
390 views

Wiringpi interrupts

If I make an interrupt and use a goto statement to go from the interrupt function to the main function will I start running into problems: with the flow of my program and with bugs. Will I start ...
1
vote
1answer
151 views

Are there any know issues with wiringpi on Stretch for PWM (pin 18) control

I have Python code that has run for a long time on RPis using Jessie to control an Adafruit PiTFT. I dim the screen in that code by adjusting PWM on pin 18 - works fine. I just recently built an ...
1
vote
2answers
198 views

Updating to Raspbian 9 leading to errors using PWM (wiringPi)

A few days ago I updated my Raspberry Pi (Rev. 3) to the new Raspbian 9 (based on Debian "Stretch"). Everything went fine but when I tested some of my own tools I recognized a strange behaviour ...
1
vote
1answer
121 views

Servo turns one way except in Python

I am currently busy with a project where i need a servo to turn, i wrote a script in WiringPi (Python & .NET) that does this: //Set GPIO scheme. WiringPi.WiringPiSetupGpio(); ...
0
votes
1answer
324 views

Is wiringPiSetup BCM or BOARD?

I am using WiringPi to simulate PWM output to my GPIO pins. My problem is that I converted from the regular Rpi.GPIO library to WiringPi. I used BCM as GPIO mode but now WiringPi uses BOARD. How can I ...
1
vote
2answers
492 views

cannot control pwm through c program by wiringpi

I am trying to control frequency and duty cycle through c-program based on wiringPi library. Here is the code: #include <wiringPi.h> #include <stdio.h> #include <stdlib.h> #include ...
0
votes
1answer
94 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 ...