Questions tagged [wiringpi]

Question regarding Wiring Pi - a GPIO Interface library for the Raspberry Pi

Wiring Pi - a GPIO Interface library for the Raspberry Pi

WiringPi is a PIN based GPIO access library written in C for the BCM2835, BCM2836 and BCM2837 SoC devices used in all Raspberry Pi. versions. It’s released under the GNU LGPLv3 license

Site: http://wiringpi.com/

Reference: http://wiringpi.com/reference/

Download: http://wiringpi.com/download-and-install/

Github: https://github.com/WiringPi/WiringPi

145 questions
0
votes
0 answers

How to export a compiled C++ project as executable for Raspberry Pi 3 (ARM, Raspberry Pi OS 32 bit)

I have a Raspberry Pi 4B with Raspberry Pi OS x32. I use Code::blocks and gcc-compiler for the development. I wrote a simple C++ project that contains only one source file and use some libraries. The code is below: #include #include…
0
votes
0 answers

Locating Wiring Pi ARM library for cross compiling in C++

I'm trying to use CMake to cross compile a C++ code using the Wiring Pi library but I'm having trouble with making CMake to find said the correct library. Since I'm compiling from x86 to ARM in order to run on a Raspberry Pi 2, I assumed I should…
0
votes
0 answers

Raspberry pi C++ wiringpi.h wiringSerial.h multithreading

I have a multi-threaded application where I use wiringpi for button and pwm control. And I want to add a barcode reader(A800D) using a serial connection to it. Everything works fine if the thread with the reader is running and the rest of the…
scared
  • 1
  • 1
0
votes
0 answers

WiringPi i2c read or write errno 6

Have a nice day. I have a pca9685 controller. When I try to read and write I get the error errno 6. root@orangepipc:~/wiringOP# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- --…
0
votes
1 answer

How to use wiringpi?

I'm using raspberry pi 3 b+ and si7021 to get temperature and humidity. But now I have a problem that I don't know how to use wiringpi correctly. This is my code: import sys import time import wiringpi I2C_ADDR = 0x40 SI7021_REG_NO_HOLD_HUMIDITY =…
0
votes
0 answers

RaspberryPi GPIO assembly program digitalRead returning HIGH without any physical button press

This Question is a Repost, I figured I would just start all over again seeing as how there were several issues regarding context and formatting in it Program Function: The function of my program is to blink LEDs on and off through the use of a loop…
BeefCake
  • 3
  • 2
0
votes
0 answers

How do I write a 32-bit ARM ASM program to activate a loop using input from a wiringPi?

So I am creating a program that will cause an LED to blink on and off when a button is being pressed and held down, however, when I run the program that I have written, pressing the button will not initiate the LED's "blnkr" loop, are there any…
BeefCake
  • 3
  • 2
0
votes
1 answer

RPi Wiringpi fails to read i2c correctly

I have an AHT21 that communicates over i2c: I send 3 bytes and get back 6. The arduino sketch works but the RPi does not. What is wrong with WiringPi i2c syntax? I want to convert this arduino sketch to RPi c++ program using WiringPi. This…
RickG-VT
  • 1
  • 2
0
votes
0 answers

not all PWMs are generated in Pi4 wiringPI language C

I am working on a project where I have to use multi-threading to generate multiple pwms. I am working on raspberry and I use WiringPI to generate softPWMs. The problems is my raspberry does not want to generate 5 PWMs. Each time a run the code, the…
0
votes
0 answers

Is there an equivalent approach to wiringPiNodeStruct in pigpio?

my question is: Is there an equivalent approach to wiringPiNodeStruct in pigpio? More specifically, I want to translate some codes that you can find for WiringPi to codes that use pigpio. It looks like this: // wiringPiNodeStruct: // This describes…
Micha93
  • 628
  • 1
  • 9
  • 22
0
votes
0 answers

c compiler can't find -lwiringpi even though RPi.GPIO works on python (wiringPi 2.52)

So I want to learn some stuff with my raspberry pi (4v) and I can run python files but I can't use the library for C I installed wiringPi by the guide of wiringpi.com / wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/ My bash output is: gcc…
Mentai
  • 1
0
votes
1 answer

how to add wirinigPi library on buildroot?

How to add wiringpi in Buildroot image ? I followed the same steps as described here: How to add an out-of-tree package to buildroot? The download of the git archive functions correctly but the compilation of the library doesn't work. I tried to…
0
votes
1 answer

How can I print a digitalRead using wiringPi in a C programm

I am trying to run a program for reading an encoder in a motor. The PWM is running correctly but I would like to read the input from the encoder. I am using digitalRead and I already tried with printf(digitalRead(21)) but it does not really work.…
emmanuel
  • 5
  • 4
0
votes
1 answer

How do I run the PWM with wiringPi?? (Issue with pwmMode PWM)

I am trying to run a PWM programm in geany (C language with a Raspberry 4B). I can compile and build the program; however, when I run it the next erro appears: pinMode PWM: unable to do this when using /dev(gpiomem. Try sudo? Does anyone have had…
emmanuel
  • 5
  • 4
0
votes
1 answer

How can I build the file in C++ with wiringPi?

I am trying to run an example program from the wiringPi in C++ in Geany software(called blink.cpp) This is the code (I did not do it, I took it directly from the wiringPi exmples in order to see how the GPIO from Raspberry Pi works): #include…
emmanuel
  • 5
  • 4