From 234428209ae9cc90d38a2288c2d5645a7ead4cef Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sun, 16 Jun 2024 11:08:55 -0700 Subject: [PATCH] update py examples' comment about pin numbers --- examples_linux/acknowledgement_payloads.py | 9 ++++----- examples_linux/getting_started.py | 9 ++++----- examples_linux/interrupt_configure.py | 9 ++++----- examples_linux/manual_acknowledgements.py | 9 ++++----- examples_linux/multiceiver_demo.py | 9 ++++----- examples_linux/scanner.py | 6 ++++++ examples_linux/streaming_data.py | 9 ++++----- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/examples_linux/acknowledgement_payloads.py b/examples_linux/acknowledgement_payloads.py index 8a2bf9a8a..d0fcb20f8 100644 --- a/examples_linux/acknowledgement_payloads.py +++ b/examples_linux/acknowledgement_payloads.py @@ -13,12 +13,11 @@ print(__file__) # print example name ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/getting_started.py b/examples_linux/getting_started.py index 6701b88d8..6b91d0a13 100644 --- a/examples_linux/getting_started.py +++ b/examples_linux/getting_started.py @@ -12,12 +12,11 @@ print(__file__) # print example name ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/interrupt_configure.py b/examples_linux/interrupt_configure.py index b42930a6f..54aea0bb1 100644 --- a/examples_linux/interrupt_configure.py +++ b/examples_linux/interrupt_configure.py @@ -31,12 +31,11 @@ ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/manual_acknowledgements.py b/examples_linux/manual_acknowledgements.py index d310626b9..b577281b8 100644 --- a/examples_linux/manual_acknowledgements.py +++ b/examples_linux/manual_acknowledgements.py @@ -19,12 +19,11 @@ print(__file__) # print example name ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/multiceiver_demo.py b/examples_linux/multiceiver_demo.py index c0cc1496b..66fa160e7 100644 --- a/examples_linux/multiceiver_demo.py +++ b/examples_linux/multiceiver_demo.py @@ -16,12 +16,11 @@ print(__file__) ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/scanner.py b/examples_linux/scanner.py index bfe60728e..ec0ca539d 100644 --- a/examples_linux/scanner.py +++ b/examples_linux/scanner.py @@ -12,6 +12,12 @@ from RF24 import RF24, RF24_1MBPS, RF24_2MBPS, RF24_250KBPS, RF24_DRIVER +########### USER CONFIGURATION ########### +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use +# their own pin numbering +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22 diff --git a/examples_linux/streaming_data.py b/examples_linux/streaming_data.py index 3d85484b5..717a7efeb 100644 --- a/examples_linux/streaming_data.py +++ b/examples_linux/streaming_data.py @@ -12,12 +12,11 @@ print(__file__) # print example name ########### USER CONFIGURATION ########### -# See https://github.com/TMRh20/RF24/blob/master/pyRF24/readme.md -# Radio CE Pin, CSN Pin, SPI Speed -# CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use +# CE Pin uses GPIO number with RPi and SPIDEV drivers, other drivers use # their own pin numbering -# CS Pin addresses the SPI bus number at /dev/spidev. -# ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. +# CS Pin corresponds the SPI bus number at /dev/spidev. +# ie: radio = RF24(, *10+) +# where CS pin for /dev/spidev1.0 is 10, /dev/spidev1.1 is 11 etc... CSN_PIN = 0 # GPIO8 aka CE0 on SPI bus 0: /dev/spidev0.0 if RF24_DRIVER == "MRAA": CE_PIN = 15 # for GPIO22