0

I know about the two modes of working in Pi using python, Board and BCN. However, I am really confused as to the instances or situations where I should use them.

An example demonstrating their use would really be helpful.

  • Does the answer answer your question? If so, please accept it with a click on the tick on the left side on it. This will finish your question and it will not pop up again year by year. – Ingo Nov 6 at 10:40
0

There are at least three incompatible GPIO numbering systems used on the Pi.

  • Broadcom GPIO number (BCM). The GPIO is identified by the number that is used by Broadcom (the SoC manufacturer)
  • Board. The GPIO number is identified by the pin it is attached to on the expansion header.
  • wiringPi. The GPIO are named in a somewhat arbitrary sequence.

Most GPIO libraries will support one or two numbering schemes.

It does not matter which numbering scheme you use as long as it is supported by the software you are using.

I would recommend using Broadcom numbering as it is the one most widely used.

For examples see https://elinux.org/RPi_GPIO_Code_Samples

For reference the popular Python GPIO libraies are as follows.

  • RPi.GPIO - board and Broadcom
  • RPIO.GPIO - board and Broadcom
  • wiringPi - wiringPi and Broadcom
  • pigpio - Broadcom
  • gpiozero - Broadcom

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.