Skip to content

Conversation

xon235
Copy link
Contributor

@xon235 xon235 commented Aug 23, 2019

This seems to be the better way in order to avoid confusion

This seems to be the better way in order to avoid confusion
@tannewt
Copy link
Member

tannewt commented Aug 23, 2019

How does this avoid confusion? Is there a context for this that I'm missing?

@caternuson
Copy link
Contributor

Is it to go along with these commented out lines?

# With I2C, we recommend connecting RSTPD_N (reset) to a digital pin for manual
# harware reset
#reset_pin = DigitalInOut(board.D6)
# On Raspberry Pi, you must also connect a pin to P32 "H_Request" for hardware
# wakeup! this means we don't need to do the I2C clock-stretch thing
#req_pin = DigitalInOut(board.D12)
#pn532 = PN532_I2C(i2c, debug=False, reset=reset_pin, req=req_pin)

@xon235
Copy link
Contributor Author

xon235 commented Aug 24, 2019

Is it to go along with these commented out lines?

# With I2C, we recommend connecting RSTPD_N (reset) to a digital pin for manual
# harware reset
#reset_pin = DigitalInOut(board.D6)
# On Raspberry Pi, you must also connect a pin to P32 "H_Request" for hardware
# wakeup! this means we don't need to do the I2C clock-stretch thing
#req_pin = DigitalInOut(board.D12)
#pn532 = PN532_I2C(i2c, debug=False, reset=reset_pin, req=req_pin)

Yes, since we are letting others choose which connection or feature to choose by uncommenting lines, we might as well include import lines for required imports when uncommenting lines such as line 48, 51 and also 56. Which all requires DigitalInOut.

I first came across this when trying this example using SPI.

@caternuson caternuson requested a review from a team August 27, 2019 14:37
@caternuson
Copy link
Contributor

Thanks. Looks good. Hopefully that will be a little more clear and less confusing when trying to use I2C/SPI.

@caternuson caternuson merged commit 0462a16 into adafruit:master Aug 28, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 29, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.0.8 from 2.0.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_PN532#25 from xon235/fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_TLV493D
@adafruit adafruit deleted a comment from dangell7 Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants