Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes
Accepted

multiple UARTs on the 40-pin

so where was one big misunderstandings. thanks to @joan for pointing to the docs and @tlfong01 for their link to their article: https://penzu.com/public/b94e6b30 essentially, on the raspberry 4, there ...
rmalchow's user avatar
  • 191
6 votes
Accepted

wiringpi is missing from bullseye. how do i install it?

Wiringpi is deprecated. You may be able to install the last release from the author's website which may or may not work on Bullseye. There are a few alternative libraries. See Controlling Raspberry Pi ...
Milliways's user avatar
  • 60.3k
5 votes

WiringPi error etates I'm not Using an RPi

I ran into this same problem using Java with Raspbian on a Pi 3 and found a posting from the Pi4J development team indicating that the problem is that when Pi4J is automatically installed, a copy of ...
Richard Chambers's user avatar
5 votes
Accepted

WiringPi: change output of GPIO pins synchronously?

It's possible with a very minor caveat. When you set a GPIO high or low you write to one of two registers. A set register to set selected GPIOs high. A clear register to set selected GPIOs low. ...
joan's user avatar
  • 71.1k
5 votes

Is this behaviour of GPIO pins normal?

On many electronics boards, GPIO pins are set to a "floating voltage" (not on, not off, just somewhere in the middle) until the pin actually gets initialized or used for the first time. Remember, ...
tlhIngan's user avatar
  • 3,372
5 votes

Is this behaviour of GPIO pins normal?

Most of the pins are configured as inputs. This is normal, and usually the safest option. All of these inputs are put into a defined state with either a pullup or pulldown. The normal values are ...
Milliways's user avatar
  • 60.3k
5 votes
Accepted

how to read output of gpio readall

The ALTx signifies the alternate functions of a pin. See this for a better understanding. BCM is the pin number when using GPIO (aka BCM) numbering scheme, and wPi is the pin number when using the ...
stevieb's user avatar
  • 1,456
5 votes
Accepted

Cross compiling for RPi - error while loading shared libraries

Shared or dynamic libraries are needed at run time. So you need the library not only on the build system but in on the target system, in this case on the PI. This is different from static libraries. ...
RalfFriedl's user avatar
  • 2,188
4 votes
Accepted

WiringPi pin numbering for RPi 2B and 3B?

The side where your micro sd card is the upper side, the first number is your gpio pin number from the RPi itself (in ascending order) then there is the Broadcom number, and between the parenthesis as ...
Rizzle Light's user avatar
4 votes

How to run 2 servos with wiringpi2 on Raspberry pi 2

Lucky to see this question, I just spent weeks on controlling two servo (SG90) using WiringPi and programming in C, there're three things that I recommend. 1.Using BCM GPIO instead of WiringPi Pin ...
Mou's user avatar
  • 41
4 votes
Accepted

How do you force wiringPI library to use local time instead of UTC time?

The use of UTC time seems to be hardcoded in ds1302 utility. Note the following line: gmtime_r (&now, &t) ; This converts your system time to UTC, before writing it to the DS1302 chip. When ...
Dmitry Grigoryev's user avatar
4 votes

Is this behaviour of GPIO pins normal?

The programmable pins (General Purpose Input/Output) can be used in a variety of ways - but not all at the same time. Before the point where power is applied to the RPi's Systen-on-Chip (Soc) AND it ...
SlySven's user avatar
  • 3,621
4 votes

how to read output of gpio readall

There is a great write up on this at https://iotbreaks.com/understand-gpio-readall-bash-shell-command-output-on-raspberry-pi/ In keeping with the "Good answers" guidelines, I'll plagiarize the ...
Bruno Bronosky's user avatar
4 votes

Wiring Pi - Root not required?

wiringPi was modified to allow the use of /dev/gpiomem rather than /dev/mem to access the GPIO. To access the GPIO via /dev/mem requires root privileges. By default /dev/gpiomem can be accessed by ...
joan's user avatar
  • 71.1k
4 votes
Accepted

Why is WiringiPi unable to find hardware revision?

WiringPi is not supported on any other operating systems than Raspbian - so its likely this feature is not supported in Ubuntu. WiringPi is developed directly on a Raspberry Pi running 32-bit ...
CoderMike's user avatar
  • 6,997
4 votes
Accepted

Setting Pull Up/Pull Down mode doesn't work (mostly)

I can confirm that result with version 2.52 of wiringPi, setting the pulls does not work on the Pi4B. wiringPi is now deprecated. http://wiringpi.com/wiringpi-deprecated/ You could contact the ...
joan's user avatar
  • 71.1k
4 votes
Accepted

says i don't have wiringpi module when runing code at startup

You cannot use ~/.bashrc to run a program at boot up. It is to configure bash and runs only with bash sessions and not at boot up of the RasPi. To have a service started on boot up you best use a ...
Ingo's user avatar
  • 42.2k
4 votes

GPIO pins not changing state

You are confusing wiringiPi numbers with GPIO numbers. The sysfs interface uses GPIO numbers. The highlighted GPIO is GPIO 26 (wiringPi 25). GPIO 25 is connected to pin 22. See https://pinout.xyz/
joan's user avatar
  • 71.1k
4 votes

wiringpi is missing from bullseye. how do i install it?

I was successful with "Rasberry PI OS Bullseye" using this fork: https://github.com/WiringPi/WiringPi cd /tmp wget https://github.com/WiringPi/WiringPi/releases/download/2.61-1/wiringpi-2.61-...
fishbone's user avatar
  • 151
3 votes
Accepted

Wiring a 3 pin toggle switch to Raspberry Pi 3

This is a two state system -- the switch is either to the left or to the right. Since there are three pins, and presuming two of them are not hardwired together, this means the switch position ...
goldilocks's user avatar
  • 59.1k
3 votes

SystemD unit dependencies to start wiringPi GPIO application

I believe there's a degree of indeterminacy with regard to execution order. If this isn't required by anything else, and isn't required to happen before anything else, then it won't be a priority. ...
goldilocks's user avatar
  • 59.1k
3 votes
Accepted

How to address gpio pins

There are several different GPIO numbering schemes. You need to ensure that the software you are using is using the numbering scheme you expect. See https://pinout.xyz/ for the gory details. The ...
joan's user avatar
  • 71.1k
3 votes
Accepted

How to read gpio current mode in shell or wiringpi

pigpio offers a method to read the GPIO mode from C, Python, and the shell. C http://abyz.me.uk/rpi/pigpio/cif.html#gpioGetMode Python http://abyz.me.uk/rpi/pigpio/python.html#get_mode shell http://...
joan's user avatar
  • 71.1k
3 votes

When to set internal pin resistance at software layer

That is not so good. So the 3.3V power pin from the RPi is connected to the breadboard's top-most rail via a red jumper (note this isn't actually used by the rest of the circuit but I don't believe ...
goldilocks's user avatar
  • 59.1k
3 votes

Can't access GPIO pins directly from C++ with wiringPi

You cannot mix "direct register access" with code using GPIO libraries. You have to select one method and stick to it fom beginning do end, no matter how painful it is. A good example of direct ...
flakeshake's user avatar
  • 6,213
3 votes
Accepted

wiringPi.h: No such file or directory #include < wiringPi.h>

The problem is the space after the <. The system is looking for a file called " wiringPi.h" rather than "wiringPi.h". I.e. use #include <wiringPi.h> #include <stdio.h>
joan's user avatar
  • 71.1k
3 votes
Accepted

How to find out whether GPIO is HIGH (without RPi.GPIO module)

To control GPIO from the command line you can use the GPIO Sysfs Interface for Userspace. For example to monitor pin 26 you can do: Prepair pin 26 rpi ~$ sudo -Es rpi ~# echo 26 > /sys/class/gpio/...
Ingo's user avatar
  • 42.2k
3 votes
Accepted

How to access to I2C software with wiringpi library-

As you say in your comment just use the wiringPiI2CSetupInterface function. This function is actually called by wiringPiI2CSetup. E.g. rather than fd = wiringPiI2CSetup(0x31); Use fd = ...
joan's user avatar
  • 71.1k
3 votes
Accepted

GCC and makefile on Raspberry Pi running NOOBS deletes my c file

The -o option to gcc specifies the name to be given to the executable. You are saying name the executable as the input source code. That is almost certainly an error.
joan's user avatar
  • 71.1k
3 votes

Input on GPIO at very Fast Speed

To "ensure exact timing" you will need to use a microprocessor. Perhaps an Arduino would be suitable. You should be able to find one which will "ensure exact timing" to any accuracy you need. A ...
joan's user avatar
  • 71.1k

Only top scored, non community-wiki answers of a minimum length are eligible