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
1
vote
1 answer

C++ not writing whole data to UART port

I have been testing UART communication in C++ with wiringPi. The problem: It seems that C++ isn't outputting whole data into the UART port /dev/ttyAMA0. Perhaps I'm doing it the wrong way? Investigations: Note : I am using minicom, minicom…
1
vote
1 answer

Why do some pins don't work with wiringPi?

I'm trying to write a simple program which uses the GPIO pins of the Raspberry Pi 3B. When I run the following program, only the LED on pin 17 flashes. Pin 27 doesn't blink and doesn't get set to OUT. I don't get any error messages. int main(){ if…
Addi873
  • 85
  • 5
1
vote
1 answer

RPi::Pin objects -- can they be destroyed? So that another one using that pin can be created?

RPi::Pin objects -- looks like they can't be properly destroyed? In this (perl) Test::More test fragment, I create a pin, use it (I watch the light blink), then destroy the pin object and try to create another. That fails as shown below. subtest…
dd-b
  • 113
  • 1
  • 8
1
vote
1 answer

What is an effective test strategy for testing an application by mocking IP sockets, serial port, and a shared library?

I wish to write some automated integration tests for a C++ application that uses an external shared library - specifically WiringPi on a Raspberry Pi. This library is used to read/write GPIOs on the RPi. I am currently using WiringPi-Sim on an…
davidA
  • 12,528
  • 9
  • 64
  • 96
1
vote
3 answers

Why does not WiringPiISR block the main routine when it is fired?

I am developing a program in C to run on a raspberry board. In the program i want to use WiringPiISR to handle a pin triggered interrupt. However, I have found that instead of blocking the main routine, the wiringPiISR creates a concurrent thread.…
1
vote
2 answers

to transmit and receive floating point using serial communication c++

using WiringPi library for serial communication on Raspberrypi the function serialPutchar(int fd, unsigned char c) and serialGetchar (int fd) works fine to send and receive integer value but does not show floating points sender side int main…
jeeth
  • 23
  • 4
1
vote
0 answers

Microsecond pulses with Raspberry Pi

Trying to output 10 mhz pulses with Raspberry Pi/pi4j, wiringPi... No problem with millisecond pulses This works on Mac...doesn't work on Raspberry Pi with pi4j and wiringpi installed: final long INTERVAL = 100; long start =…
sdvic
  • 11
  • 2
1
vote
0 answers

PWM on raspberry pi frequency always low

I wrote a program in java using the pi4j library, i tried setting the frequency divisor as low as possible as you can see, but i'm getting an output frequency of about 1Hz and i can't seem to get it any higher. Any thoughts? public class…
1
vote
0 answers

Toggling GPIO pin on Raspberry Pi after serialPutchar() speed

I am trying to talk to an encoder from my Raspberry Pi 3B+ using a baud rate of 2000000. The signal that is coming out of the Pi is being converted from a RS-232 to an RS-485 signal using a chip that needs a chip select toggled to allow…
Bjduf123
  • 43
  • 5
1
vote
0 answers

How to build WiringPi with JUCE?

I’ve successfully built and compiled JUCE on a raspberry pi b+ which works smooth. Now I'm trying to use WiringPi within JUCE with a knob/rotary encoder to display text on a lcd. Everything works but when I try to call wiringPi functions inside my…
T Shoats
  • 347
  • 2
  • 4
  • 19
1
vote
1 answer

How to determine button press duration with wiringpi in C

For a aspberry pi project I have buttons connected to GPIO and I want to take different actions depending on how long a button has been pressed. The following python code (extract) is working as expected: on_button2(channel): t1 = time.time() …
1
vote
0 answers

Cross Compile of WiringPi library

I'm trying to set up a cross-compile flow targeting Raspberry Pi from a Linux Ubuntu VirtualBox install. I cloned the tool repo (as opposed to setting up a full crosstool-ng build) and am able to compile a basic hellow world app and run it on my…
1
vote
2 answers

Multiple function calls on one interrupt-generating button press

So I have a c++ program here utilizing wiringPi to sleep a thread until a button press (on a rapsberryPi using the GPIO), but when the button is pressed it can often print the message multiple times. I tried to remedy this by sleeping for a few…
1
vote
1 answer

Getting bad instructions error when compiling the following code in assembly

I am working on a raspberry pi at the moment and I am running into an issue with my assembly code. When i try to run it with the following command: as button.o button.s in terminal. An the following errors occur: Assembler messages: Error:…
shurburt
  • 93
  • 2
  • 6
1
vote
0 answers

does WiringPI work with more than 2 GPIO pins?

Ive tried to make 4 LED's light and close or a combination of state, but only 2 of these LED are actualy working,and thats 17 ,22. the rest doesnt seem to respong when i click the buttons
1 2
3
9 10