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
6
votes
0 answers

How to troubleshoot GPIO Zero?

I'm trying to do a pretty basic 'get an LED' to blink tutorial with a Raspberry Pi Zero. Following this guide: Blink: Making An LED Blink On A Raspberry Pi I'm able to get the LED to turn on and off with the gpio command line utility, and the…
Lorin
  • 1,022
  • 1
  • 8
  • 14
4
votes
0 answers

High precision sleep/delay in python (without interruption)

I need to do some operations on Raspberry Pi3 pins in specific time. For example I send some bytes via uart then I need to wait about 5ms and again send next part of bytes, but I noticed that if I do time.sleep(0.005) or for example…
KyluAce
  • 933
  • 1
  • 8
  • 25
4
votes
1 answer

How to get back to main GUI thread when handling an interrupt?

I have a Raspberry Pi 3 running a GUI program written in Qt. I'm using the wiringPi library to set an interrupt that fires when a certain GPIO pin goes low. When this happens, I want a dialog window to appear telling the user that the Pi will…
Carlton
  • 4,217
  • 2
  • 24
  • 40
4
votes
1 answer

unsigned char array from int array in python

I try to define a new character (a capital german umlaut "Ä") on my 2004 lcd on a raspberry pi using wiringPi's lcdCharDef() This is my code import wiringpi2 as wiringpi # Ä cap_umlaut_a = [ int('0b01010', 2), int('0b00100', 2), …
speendo
  • 13,045
  • 22
  • 71
  • 107
3
votes
2 answers

timer couldn't work with wiringPiISR (QtQuick application)

I have created a class Capteur_Input and one of the options in the constructor creates an interrupt using wiringPiISR wiringPiISR(m_pin, INT_EDGE_RISING, isrInput); my class also has an attribute m_impulsion and I am incrementing this value each…
mina
  • 185
  • 1
  • 7
3
votes
1 answer

Cross-compiling and linking to a library in a sysroot - what's wrong?

I am not inexperienced but it's become clear to me that I lack some fundamental understanding in the area of cross-compilation and sysroots. I'm hoping someone can provide me that gem of information I need to continue. I have downloaded a pre-built…
davidA
  • 12,528
  • 9
  • 64
  • 96
3
votes
2 answers

How to enable wiringpi GPIO control inside a Docker container

I've used the answer to this question to enable control of my Raspberry Pi GPIO pins from within a Docker container, which runs Alpine. $ docker run --device /dev/gpiomem whatever This works with the Python RPi.GPIO module, but not with…
Jonathan Holvey
  • 697
  • 9
  • 27
3
votes
1 answer

Serial communication between RPi and Arduino using C++

I've written two pieces of code, to create a serial communication between Arduino and a Raspberry Pi using C++. The codes are: void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 baud } void loop() { …
3
votes
0 answers

Raspberry PWM Output with Pi4J

My target is to code a GUI in Java where with which the user can output a PWM signal over one of the Hardware-PWM Pins of the Raspberry 3. Doing so, the user should be able to select the length of a whole pulse (in ms), the length of the duty cycle…
Jas On
  • 51
  • 8
3
votes
0 answers

Representing a number with one byte in python?

A byte of data can represent values from o to 255. However, when I declare a byte objct in python and give it an integer less than 255, the size is still…
Adi
  • 75
  • 1
  • 9
3
votes
3 answers

Qt Creator code as a user but run and debug as root

Would it be possible to execute QtCreator as a nornal user but run and debug an application as root? That would be useful i.e. while developing applications based on WiringPi, which facilitates the access to GPIO but requires root to effectively…
KcFnMi
  • 5,516
  • 10
  • 62
  • 136
3
votes
1 answer

Linking libwiringPi on Cross Compiler for RPI

I have a RPI 3 model B, and I want to compile a small program for interacting with the device's SPI. I am writing the program on my Linux desktop so I want to cross compile the program. For this I have installed the cross compiler from here:…
Guy Yafe
  • 991
  • 1
  • 8
  • 26
3
votes
1 answer

python read file to turn on LED

I'm trying to get a python script to read the contents of a text file and if it's 21 turn on a LED but if it's 20 turn it off. The script also prints out the contents of the text file on the screen. The contents print out works all ok but the LED…
user2669997
3
votes
1 answer

How to stop loop using character input without pausing loop

Good day, I am trying to create a program that obtains orientation data from Sensors then uses that in a PID control algorithm to create corresponding PWM signals. I would like to be able to stop the program by pressing enter. I tried using opencv's…
user123456098
  • 181
  • 1
  • 1
  • 8
2
votes
2 answers

Map Raspberry hardware GPIO pins to gpiod chip line numbers

I was playing with my Raspberry Pi over the weekend. I used a tutorial from Freenove that I followed to realize a few simple circuits that are controlled by the GPIO pins on the raspberry. The Freenove tutorial is using a deprecated library named…
lanoxx
  • 12,249
  • 13
  • 87
  • 142
1
2 3
9 10