Questions tagged [wiringpi]

WiringPi is a C language library for accessing GPIO pins.

WiringPi is a C language library for accessing GPIO pins. The homepage for WiringPi can be found at: http://wiringpi.com/

Full documentation and instructions for using the library will be found there.

216 questions
26
votes
3 answers

Control Hardware PWM frequency

I'm using the hardware PWM output with wiringpi. It provides the function pwmSetClock that should make it possible to change the frequency. (https://projects.drogon.net/raspberry-pi/wiringpi/functions/). I believe since the default is 200 Mhz…
user1217949
  • 827
  • 2
  • 9
  • 14
7
votes
3 answers

SPI: Raspberry PI master and Arduino slave

I'm trying to have a Raspberry PI act as a SPI master and send data to an Arduino Nano (one of the cheap clones). I partly succeeded, but I don't get a continuous communication, and some bytes get lost. I only use simple wires on a breadboard to…
Stefano Masini
  • 171
  • 1
  • 1
  • 3
6
votes
2 answers

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 explanation but couldn't find anything. I found the…
flashburn
  • 173
  • 1
  • 1
  • 6
6
votes
3 answers

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 are on (lower light), after boot the GPIOs used…
Blue
  • 61
  • 2
5
votes
2 answers

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. I am using LEDs to check if a pin is high or low…
Rumesh
  • 223
  • 1
  • 3
  • 8
5
votes
5 answers

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 is not a Raspberry Pi then you are on your own as…
muk
  • 51
  • 1
  • 2
5
votes
2 answers

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 SystemD unit file to start the application…
Pascal Rosin
  • 539
  • 6
  • 14
5
votes
1 answer

Using BCM GPIO pin numbers with wiringPi C library

I'm a GPIO newbie experimenting with getting my Raspberry Pi to blink an LED with C using the wiringPi library. The example code at http://wiringpi.com/examples/blink/ (blink.c) compiles perfectly and runs as advertised. Here's my question: the…
lefthander
  • 153
  • 1
  • 3
5
votes
1 answer

Reading HC-SR04 echo with wiringPiISR()

The following code works with the busy wait, but if I replace the while loop with a call to wiringPiISR() it always returns 0 for the distance. I also tried calling wiringPiISR() before raising the trigger pin thinking that the echo pin might have…
Eric Turner
  • 161
  • 1
  • 4
5
votes
2 answers

Raspberry Pi to Arduino (Leonardo) avoiding latency

I'm using a Python script via (TkInter) on the Raspberry Pi to capture mouse movement and events. My goal is to send this data, in real time, to another connected Arduino device(Leonardo). My first decision is how to connect-send this data. My…
Bachalo
  • 173
  • 3
  • 7
5
votes
4 answers

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 interface. Setting the pin mode to input or…
PMF
  • 906
  • 7
  • 14
4
votes
2 answers

100% processor usage with WHILE loop in Raspberry Pi

I am using wiringPi Library and using this library to read data from GPIO Pins attached to a PIR Sensor. I am using a while loop which reads input data. If there is a motion it will print motion. while(1) { while(digitalRead(1)==0) …
Veer
  • 149
  • 2
  • 6
4
votes
1 answer

WiringPi pin numbering for RPi 2B and 3B?

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's pin numbering is different to that of the RPi…
Jayy
  • 566
  • 2
  • 6
  • 19
4
votes
1 answer

Read the value of an GPIO output pin

I've made a program using the wiringPi library that assigns GPIO pins to toggle at the press of associated number keys. I'd like my program to show the current status of the pins, even if they are toggled by external means (like another user running…
Alexander
  • 600
  • 6
  • 18
4
votes
2 answers

I2C using wiringPi or IOCTL in C, more than 2 bytes

I'm willing to send 20 bytes at a time to Arduinos via I2C bus. I'm writing a C program (that will become a Daemon) that should achieve this, and thus I downloaded via Git the last wiringPi library, and it is working great when sending one byte of…
Sierramike
  • 43
  • 1
  • 4
1
2 3
14 15