From 40a48c566c42bc730b65b4d3f3d93602747e5738 Mon Sep 17 00:00:00 2001 From: labuser Date: Wed, 8 May 2024 09:51:52 +0200 Subject: [PATCH 1/3] change pin numbering mode from BOARD to BCM --- tangods_rpigpio/rpigpio.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tangods_rpigpio/rpigpio.py b/tangods_rpigpio/rpigpio.py index 13750c1..ca608d4 100644 --- a/tangods_rpigpio/rpigpio.py +++ b/tangods_rpigpio/rpigpio.py @@ -17,7 +17,7 @@ def initialize_dynamic_attributes(self): access=AttrWriteType.READ_WRITE if gpio_mode == "OUT" else AttrWriteType.READ, fget=self.gpio_read, fset=self.gpio_write if gpio_mode == "OUT" else None, - memorized=True, + memorized=True if gpio_mode == "OUT" else False, ) self.add_attribute(attr) @@ -38,7 +38,8 @@ def gpio_write(self, attr): def init_device(self): Device.init_device(self) if self.validate_properties(): - GPIO.setmode(GPIO.BOARD) + # use internal chip numbering of GPIOs + GPIO.setmode(GPIO.BCM) self.gpio_dict = dict(zip(self.GPIO_LABELS, self.GPIO_PINS)) for gpio_pin, gpio_mode in zip(self.GPIO_PINS, self.GPIO_MODES): try: From cbb64f0cdb02cfada50f8a1fec746547f1340567 Mon Sep 17 00:00:00 2001 From: labuser Date: Wed, 8 May 2024 09:52:04 +0200 Subject: [PATCH 2/3] update numbering information --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5449114..4f97e9e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ In order to use this tangoDS you need to specify the occupied GPIO of Raspbrerry You can see the pinout of RaspberryPI GPIO in the picture below: ![](doc/gpio-pinout.png) +The TangoDS uses the internal GPIO numbering of the Broadcom chip as set by the command +`GPIO.setmode(GPIO.BCM) . ` ## Authors Leonid Lunin From 63d26ca38493d1d71278d90c40170ee0d1735534 Mon Sep 17 00:00:00 2001 From: labuser Date: Wed, 8 May 2024 09:52:16 +0200 Subject: [PATCH 3/3] correct URL of repo --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 66cbfdf..a7a072f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="tangods_rpigpio", - version="0.0.2", + version="0.0.3", description="tango device to control raspberry GPIO", author="Leonid Lunin", author_email="lunin.leonid@gmail.com", @@ -14,7 +14,7 @@ "pytango", "RPi.GPIO>=0.7.0", ], - url="https://github.com/lrlunin/pytango-moenchZmqServer", + url="https://github.com/MBI-Div-B/pytango-raspigpio", keywords=[ "tango device", "tango",