-
Notifications
You must be signed in to change notification settings - Fork 55
Example with image rendering functionality #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Example from modified fingerprint_simpletest.py adding image viewing and saving functionality using matplotlib and numpy. This has been tested on a Linux PC but should work under Windows or MacOS.
Looks like this is failing the GitHub Actions CI. You can use |
Fixed import order error. pyplot changed to non-blocking to run properly from the command line.
I changed the import order and reformatted with black. Also added non-blocking mode in matplotlib.pyplot so the code will run properly from the command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission! I added some feedback, let me know if I can expand on anything. I can see if anyone can test this too, which would be good if we can arrange.
examples/fingerprint_picturetest.py
Outdated
@@ -0,0 +1,254 @@ | |||
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to your name, as well as remove the credit to Adafruit Industries:
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
# SPDX-FileCopyrightText: 2023 Jim McKeown |
examples/fingerprint_picturetest.py
Outdated
# Added 'View Print' and 'Preview and Find Print' functions to | ||
# example code fingerprint_simpletest.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We typically use triple quotes for docstrings, but I don't think this is a gating change. More importantly, I would specify that this example only works on single board computers with the use of Blinka, our CircuitPython compatibility layer.
import numpy as np | ||
from matplotlib import pyplot as plt | ||
import serial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are used in examples, we need to add these as dependencies to optional_requirements.txt
!
Please have a look at the latest changes and let me know if any others are needed or would be helpful. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! Just a few small tweaks, but we'll see if I or someone else can test this after these get updated!
Please have a look at the latest changes. Just one thought about pyserial. Since it is already in requirements.txt, does it also need to be in optional_requirements.txt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
All requested changes have been addressed with newer commits.
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306 to 1.6.2 from 1.6.1: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306#33 from DJDevon3/WorkingBranch Updating https://github.com/adafruit/Adafruit_CircuitPython_Fingerprint to 2.2.13 from 2.2.12: > Merge pull request adafruit/Adafruit_CircuitPython_Fingerprint#51 from jim-mckeown/main Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
Example from modified fingerprint_simpletest.py adding image viewing and saving functionality using matplotlib and numpy. This has been tested on a Linux PC but should work under Windows or MacOS.