Add function to draw QR codes #156
Open
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.
Hi, this PR attempts to add a new function to draw QR codes on the OLED display. It builds on the external dependency qrlite to generate the QR codes and then draws them with a little frame on the display.
Here's the documentation I added to the README file.
drawQRCode
Draws a QR code with a frame around it on the display. Needs the optional dependency
qr-image
to be installed for generating the QR code as a bitmap. In testing only the error correction level "Q" produces working QR codes and only strings are accepted as data for the QR code.Arguments:
Optional bool as last argument specifies whether screen updates immediately with result. Default is true.
Usage:
This PR builds on top of my other PR and is not cleanly isolated. Please consider it as a proposal and, if interesting, I'm happy to clean up the PR. If such a function is considered out of scope, you can also just close the PR.