Add support to 'listen' for tags#37
Merged
ladyada merged 1 commit intoadafruit:masterfrom Aug 19, 2020
Merged
Conversation
This adds support to break the `read_passive_target` function up into two parts if desired. First tell the PN532 to listen for tags, and then explicitly ask to read the UID from the tag. This can be useful when trying to simultaneously scan tags and run timing sensitive code, like updating neopixels, and don't want to wait for the timeout delay of `read_passive_target`.
Contributor
|
I will test out the code from this PR this week. |
Member
|
@FoamyGuy wow thanks! |
FoamyGuy
approved these changes
Aug 19, 2020
Contributor
FoamyGuy
left a comment
There was a problem hiding this comment.
I tested this out with the included pn532_simplelisten.py on an Itsy Bitsy M0 and it is working successfully. With the IRQ pin hooked up to a DigitalInOut we are now able to check if a card is present before trying to read it.
I also tested the existing simpletest and it is still working as intended for me as well.
ladyada
approved these changes
Aug 19, 2020
Member
|
nice! |
Contributor
Author
Contributor
|
You are welcome. And thank you as well @dunkmann00, this functionality is a great addition that allows the PN532 to be more easily used in complex / interesting projects. I appreciate you working on this and adding it to the Library. |
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Aug 21, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_DHT to 3.5.0 from 3.4.2: > Merge pull request adafruit/Adafruit_CircuitPython_DHT#46 from adafruit/pulseio-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_HCSR04 to 0.4.3 from 0.4.2: > Merge pull request adafruit/Adafruit_CircuitPython_HCSR04#21 from FoamyGuy/dannystaple-readme-patch Updating https://github.com/adafruit/Adafruit_CircuitPython_INA219 to 3.4.4 from 3.4.3: > Merge pull request adafruit/Adafruit_CircuitPython_INA219#24 from nvtkaszpir/patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_INA219#23 from nvtkaszpir/patch-2 > Merge pull request adafruit/Adafruit_CircuitPython_INA219#22 from nvtkaszpir/patch-3 Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS to 4.1.0 from 4.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_LSM6DS#20 from adafruit/lsm6dso32 Updating https://github.com/adafruit/Adafruit_CircuitPython_MS8607 to 1.0.1 from 1.0.0: > updated PID Updating https://github.com/adafruit/Adafruit_CircuitPython_PCT2075 to 1.1.4 from 1.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_PCT2075#12 from garrettheath4/readme-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 1.0.3 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_PM25#6 from dglaude/patch-2 Updating https://github.com/adafruit/Adafruit_CircuitPython_PN532 to 2.2.0 from 2.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_PN532#37 from dunkmann00/listen-for-passive-target Updating https://github.com/adafruit/Adafruit_CircuitPython_TLC59711 to 1.2.3 from 1.2.2: > Merge pull request adafruit/Adafruit_CircuitPython_TLC59711#14 from FoamyGuy/remove_hardcoded_baudrate Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 1.2.0 from 1.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#27 from FoamyGuy/adding_more_examples > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#24 from FoamyGuy/fix_docs_link_in_readme Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit to 1.2.0 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Adafruit#6 from dhalbert/fix-packet-sizes Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.8.2 from 2.8.1: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#88 from FoamyGuy/fix_load_glyphs_for_builtin Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.4.2 from 2.4.1: > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#64 from rhooper/adjust-copyright Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.2.1 from 3.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_Motor#46 from caternuson/example_rename > Merge pull request adafruit/Adafruit_CircuitPython_Motor#44 from caternuson/digi_step Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 1.3.2 from 1.3.1: > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#14 from FoamyGuy/simpletest_improvement Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.1.0 from 3.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#35 from FoamyGuy/adding_cpb_gizmo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support to break the
read_passive_targetfunction up into two parts if desired. First tell the PN532 to listen for tags, and then explicitly ask to read the UID from the tag. This can be useful when trying to simultaneously scan tags and run timing sensitive code, like updating neopixels, and don't want to wait for the timeout delay ofread_passive_target.This addresses #36.