Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

Filter by
Sorted by
Tagged with
0
votes
1answer
473 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
3k 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
1answer
87 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
545 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
503 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
371 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
595 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
174 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
275 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
153 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
557 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
803 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
113 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 ...
1
vote
2answers
690 views

433Mhz receiver on Raspberry Pi

So I too got my hands on one of those cheap 433Mhz transmitter/receiver components. I've followed nearly every tutorial about connecting them to a Raspberry Pi but I can't seem to figure out 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 ...
0
votes
1answer
397 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 ...
1
vote
1answer
233 views

I2C connection to MS5637 baro sensor using wiringI2CPi

I am trying to write some code to connect and drag data across I2C using the Wiring Pi library, I'm at the stage where any data would be good but this is a link to the sensor's datasheet I'm trying to ...
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. ...
3
votes
1answer
175 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
603 views

WiringPi digitalRead don't works everytime

I'm using digitalRead of wiringPi to detect packet received in CAN chip, so i'm send data and wait for falling edge of the can interrupt pin as you can see here: gettimeofday(&t1, NULL); ...
0
votes
2answers
11k 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 ...
1
vote
1answer
516 views

How to read gpio current mode in shell or wiringpi

I am trying to find out if a specific GPIO is set on OUT or IN I need something similar to this php command exec ("gpio read ".$i, $val_array[$i], $return ); but instead of returning LOW or HIGH (0 or ...
0
votes
1answer
495 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
843 views

UART communication - AVR C to Raspberry Pi 2 Python [closed]

I am still a Raspberry Pi newbie. I am using an Atmega32 to transmit data to a Raspberry Pi 2 via UART. The Atmega transmission code is in C and the RPi receiving code is in Python 2.7. Below is the ...
1
vote
2answers
1k views

How to read raspberry's pin using node.js?

I know how to write to a pin but I can't find an example of how to read for example 3.3v from a input pin using node.js. I use wiring-pi to write, how would you do it with an example? I'm using ...
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
vote
2answers
746 views

Error executing gpio from bash script file: “gpio: ”source: /usr/bin/gpio: cannot execute binary file"

Trying a simple test to light a led from a bash script file I get this error: ./led.sh: línea 2: source: /usr/bin/gpio: no se puede ejecutar el fichero binario Translated from spanish: "cannot ...
0
votes
1answer
874 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 ...
1
vote
2answers
314 views

main() and interrupt function runs at the same time?

Im using Raspberry Pi 3 model B. Using wiringPi library. For ISR I use , wiringPiISR (). When the interrupt occurs , the interrupt function get executed along with the main(). But I want to pause ...
2
votes
0answers
2k views

pilight send raw code [433MHz]

I have set up a 433Mhz receiver and sender at my raspberry pi using pilight in order to remote control a power socket (Flamingo FA500S). Unfortunately, this one is self-learning and therefore not ...
3
votes
0answers
793 views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
6
votes
3answers
732 views

Is this behaviour of GPIO pins normal?

I am using this tutorial: https://www.youtube.com/watch?v=b6ZagKRnRdM to connect that relay board to my PI, everything works fine, but I have noticed that till the GPIOs are set to out the 2 smd leds ...
1
vote
2answers
263 views

How do you force wiringPI library to use local time instead of UTC time?

I am running Pi 3 along with Real-Time Clock chip ds1302 and using wiringPI library to read and set date and time to and from ds1302 chip. After I set my Pi's system date and time to local date and ...
0
votes
1answer
204 views

Daisy chained 74HC595 driving dual 7 segment LED intermittent incorrect output

I have two 74HC595 driving two 7 segment LED displays and I wrote a simple C program to either display a specified number (00-99) from argv or count from 00 to 99. When specifying a value from the ...
1
vote
0answers
228 views

How to configure MAX11647

I am using this i2c 10 bit ADC for temperature sensing and battery level sensing with the Raspberry Pi. What is the correct way to configure this device? I tried writing the values 0x82 to the setup ...
0
votes
1answer
463 views

َUArt in Raspberry Pi

I use this code .It send data but cant get it.I short circuit Tx & Rx in Raspberry. I use this tutorial: http://www.raspberry-projects.com/pi/programming-in-c/uart-serial-port/using-the-uart ...
0
votes
1answer
6k views

Send and Receive data in uart with raspberry pi in c and wiringPi [duplicate]

I do all things like below but it dont work well this is my code : #include <stdio.h> #include <string.h> #include <errno.h> #include <wiringPi.h> #...
2
votes
1answer
2k views

WiringPi pin numbering for RPi 2B and 3B? [duplicate]

What is the pin numbering for WiringPi on the RPi model 2 B and 3 B? The pin page on wiringPi only gives the numbering for Pis with 26 GPIO pins. This is not a duplicate because the WiringPi library'...
3
votes
5answers
5k views

WiringPi error etates I'm not Using an RPi

Unable to determine hardware version. I see the following error message: expecting BCM2708 or BCM2709. If this is a genuine Raspberry Pi then please report this to projects@drogon.net. If this ...
0
votes
1answer
176 views

Is there a way to leave the SDI (MOSI) signal high during an SPI transaction?

I'm looking for a way to leave the MOSI signal high on a Raspberry Pi during an SPI transaction. I have an Si8902 ADC which reads voltage from a PCB, and its pins are connected to the appropriate pins ...
0
votes
1answer
393 views

DHT22 Temp sensor - first time connected very high readings

I have just connected a DHT22 sensor to my RPi3. I have a 10k resistor between the data line and the 3.3v. The readings i am getting when I run loldht are very high (Humidity 1100.8 % and Temp 614.4 *...
2
votes
2answers
1k views

WiringPi: change output of GPIO pins synchronously?

I'm struggling to figure out how the WiringPi C library manipulates the GPIO hardware. Is it possible to change multiple output pins on the GPIO simultaneously in C using the library? For example, ...
2
votes
2answers
2k views

SystemD unit dependencies to start wiringPi GPIO application

I want to start an application on system boot as early as possible. I am using Debian jessie. The application makes use of GPIO pins with the help of the wiringPi library. When using the following ...
0
votes
2answers
5k views

wiringPiSetup: Must be root (Did you forget sudo ?)

I have a problem when I click run it shows this error wiringPiSetup: Must be root (Did you forget sudo ?) I also try to write this on terminal sudo qtcreator to open the qtcreator as sudo but ...
0
votes
1answer
49 views

Wiring Java not always works

I just started my developments with wiring pi but i'm facing some problems with method not always being executed on Raspberry. // LED1 SoftPwm.softPwmCreate(0, 0, 100); // RED SoftPwm....
1
vote
1answer
5k views

Wiring a 3 pin toggle switch to Raspberry Pi 3

I have this small 3 pin toggle switch - just toggles left and right - it has its three pins aligned left, center and right. No datasheet for it - not sure where it came from - most likely a starter ...
1
vote
1answer
345 views

Problem using I2C with ioctl() and GPIOs with wiringPi simultaneously

I'm working on a project where I need to use GPIO to toggle pins high and low as well as gather sensor data from an I2C peripheral. I have each component working separately, GPIO using wiringPi and ...
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
286 views

Using three SPI channels with wiring pi?

I was wondering if there is a way to use three different channels for SPI through the wiring pi library. I mean I know that a chip/slave/channel select pin can be any pin capable of sending a high or ...
3
votes
1answer
2k views

Printing state of wiringpi pin onto webpage

I have a Pi set up with Apache and wiringpi, and I would like to read the state of an in pin (every 20 seconds, if possible) and display it on my webpage using PHP. The input is to determine if my ...