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
2
votes
1 answer

FFI with dependencies in Racket?

I developed a very simple FFI for the Wiring PI library, to be able to control a Raspberry Pi using Racket. This worked well, but only covers the base functionality. I wanted to extend this to also use the lcd.h from the libwiringPiDev.so, so that I…
Flywheel
  • 57
  • 3
2
votes
2 answers

How to block until WiringPi finishes to sent serial data (UART)?

Device description (for context, skip it if you don't feel comfortable with electronic): For a simple device, the communication is done in half-duplex UART (TX and RX are on the same wire), in the following way: One pin (write-mode) indicate if the…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
2
votes
4 answers

wiringPi on 4th version of RaspberryPi is not working

I have an RPi4. Based on this link I need to have a version 2.52 of gpio to work properly on this device. I have done this: # cd /tmp # wget https://project-downloads.drogon.net/wiringpi-latest.deb # sudo dpkg -i wiringpi-latest.deb # gpio -v gpio…
Daniel
  • 2,318
  • 2
  • 22
  • 53
2
votes
3 answers

clock_nanosleep on RPI1 sometimes takes longer than it should

I want to generate square-signals with a first generation RPI's gpio output. For this purpose I first wanted to use wiringPi. Code language is fixed, shall be C or C++. As per wiringPi's documentation for the blink example, solution should be…
Daniel
  • 2,318
  • 2
  • 22
  • 53
2
votes
0 answers

Clion Remote Pi: undefined reference to wiringPiSetup

I am trying to run a c-program via clion IDE using the wiringPi library. Hello world runs perfectly fine, so I can assure that the connection to the pi was established correctly. However, when I add the wiringPi-Library #include and run…
2
votes
0 answers

PWM SPI I2C GPIO on android for Orange pi pc

I want to connect an RF24 Transceiver to my Orange pi Pc board that installed Official android on it I can turn on and turn off some digital pins with ADB command and set value to "/sys/class/gpio" Address in Android Os but I want to use Spi…
ahmad
  • 21
  • 1
2
votes
0 answers

The problem with wiringPi library on ODROID-C2 - function not declared in this scope

I work with ODROID-C2. I have installed the wiringPi library followed the instructions (from page https://wiki.odroid.com/odroid-c2/application_note/gpio/wiringpi): $ sudo apt install git $ git clone https://github.com/hardkernel/wiringPi $ cd…
Bob SO
  • 65
  • 6
2
votes
1 answer

Interface M24512 EEPROM with Raspberry Pi on I2C: converting Python to C++

I have to intergace M24512 EEPROM IC with Raspberry pi on I2C bus.. It shows i2cdetect -y 1 at address 0x50 I got it working on python-smbus: import smbus import time bus=smbus.SMBus(1) bus.write_i2c_block_data(0x50, 0x00, [0x00, 50, 51, 52, 53,…
Superman
  • 21
  • 4
2
votes
3 answers

Orange Pi WiringPi

I am using Orange Pi on my project , and I searched for how to control its pin via python and i FOUND some results which suggest to install Wiring Pi .I installed WiringPi from https://github.com/WiringPi/WiringPi and also with pip but in both…
t_ashrefov
  • 51
  • 1
  • 7
2
votes
1 answer

wiringPi works only with pin 7

I have this simple code on Raspberry B+. #include #include int main (int argc, char** argv) { int pin; if (argc <2) pin = 7; else pin = atoi(argv[1]); printf("Raspberry Pi wiringPi blink test\n"); if…
Charlestone
  • 1,248
  • 1
  • 13
  • 27
2
votes
2 answers

unrecognized command line option “-std=c++11”

I am trying to run wiringPi Cpp version with raspberryPi. I downloaded this and tryed to run but I go the error below. What is the problem here? Did I do something wrong?
ffttyy
  • 853
  • 2
  • 19
  • 49
2
votes
2 answers

wiringPi non-root access to GPIO

From this I though acess to GPIO for non-root users would be possible using wiringPiSetupSys() but I failed trying that. Actually, if I do setuid on the executable then it works. So, wiringPiSetupSys() isn't enought? $ ./gpio write 4 1 // This…
KcFnMi
  • 5,516
  • 10
  • 62
  • 136
1
vote
1 answer

wiringPi.h library not found, getting a build error

My code is throwing an error sayiung it can't find wiringPi.h. I thought that setting project > configuration properties > linker > Additional library directories to the place the header is contained would work. However, I still get this…
Robert
  • 11
  • 1
1
vote
0 answers

Give an angle to a servomotor

I have my servomotor conencted to my raspberry pi and I have set wiringPi but I'm only able to make it turn. I'm searching for a way to give him a specific angle. The code I'm using to make it turn: #include #include
Louis
  • 83
  • 7
1
vote
0 answers

Wiringpi Python read multiple exit

hello i made this code but its not working well can you please help me i need to read all the exit and execute an action but when the code read the pin 65 for example he dont read the pin 82 and that not what i want i got 2 mcp23017 connected to the…
Romain F
  • 11
  • 1
1
2
3
9 10