In this tutorial, we'll go through how you can use Python to encode text into a QR Code and display it on the Onion Omega's OLED Expansion.
Not a member? You should Sign up.
Already have an account? Log in.
To make the experience fit your profile, pick a username and tell us what interests you.
We will need to have support for git, Python, and the Onion OLED Expansion Python Module.
opkg update opkg install git git-http python-light python-codecs pyOledExp
Now we need to download the Python code that actually does all the work:
cd /root git clone https://github.com/OnionIoT/oledQrCodeGenerator.git
Now we have to make some QR codes! Navigate into the repo directory:
<span class="hljs-built_in">cd</span> oledQrCodeGenerator
And run the program, the argument to the script is the text that will be encoded in the QR code pattern:
root<span class="hljs-variable">@Omega-18C2:</span>~/oledQrCodeGenerator# python main.py <span class="hljs-string">'Wow, my first QR Code'</span> > Encoding <span class="hljs-number">21</span> characters<br>> Generated QR <span class="hljs-attribute">Code</span>: <span class="hljs-number">31</span>x31 pixels > Doubled QR Code <span class="hljs-attribute">size</span>: <span class="hljs-number">62</span>x62 > Initializing display > Setting display mode to inverted > Writing buffer data to display
This will encode the data and display the resulting QR code on the OLED Expansion:
View all 5 instructions
Create an account to leave a comment. Already have an account? Log In.
YD1RUH
sheikh
Ayush
Øystein
Become a member to follow this project and never miss any updates
Yes, delete it Cancel
You are about to report the project "QR Codes Using Onion Omega ", please tell us the reason.
Your application has been submitted.
Are you sure you want to remove yourself as a member for this project?
Project owner will be notified upon removal.