Selects one of the 2 available pins of the grove connector. :param int pin: **1** for the exterior pin of the grove connector (aka SIG) or anything else for the interior one.
(self, pin)
| 195 | self.get_port(), self.get_pin_mode(), self.portID)) |
| 196 | |
| 197 | def set_pin(self, pin): |
| 198 | """ |
| 199 | Selects one of the 2 available pins of the grove connector. |
| 200 | |
| 201 | :param int pin: **1** for the exterior pin of the grove connector (aka SIG) or anything else for the interior one. |
| 202 | |
| 203 | """ |
| 204 | if self.port == "AD1": |
| 205 | if pin == 1: |
| 206 | self.pin = self.gpg.GROVE_1_1 |
| 207 | else: |
| 208 | self.pin = self.gpg.GROVE_1_2 |
| 209 | elif self.port == "AD2": |
| 210 | if pin == 1: |
| 211 | self.pin = self.gpg.GROVE_2_1 |
| 212 | else: |
| 213 | self.pin = self.gpg.GROVE_2_2 |
| 214 | debug("setting pin to {}".format(self.pin)) |
| 215 | |
| 216 | def get_pin(self): |
| 217 | """ |