Donation QR Codes: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
WebDaniel (talk | contribs)
Create the "Donation QR Codes" page
 
WebDaniel (talk | contribs)
m Add #setup page anchor to README.md link
Line 18: Line 18:
</pre>
</pre>


2. Follow the setup instruction in the [https://github.com/noisebridge/donate-portal/blob/main/README.md README.md]. The project requires values for each environment variable in a <code>.env</code> file you must create in the repository root, but for the purpose of this script those values can all be bogus.
2. Follow the setup instruction in the [https://github.com/noisebridge/donate-portal/blob/main/README.md#setup README.md]. The project requires values for each environment variable in a <code>.env</code> file you must create in the repository root, but for the purpose of this script those values can all be bogus.


3. Run the script.
3. Run the script.

Revision as of 21:59, 4 February 2026

3D-printed QR code for donations

Around Noisebridge you will see many 3D-printed QR codes that streamline the donation process, allowing people to do one-off Apple Pay, Google Pay, and credit card donations.

How to create a QR Code

2D

You can quickly make a donation QR code for printing on paper or use in digital media with the QR Code Editor hosted on the Noisebridge donation portal. Make sure to do a quick test of the QR code with a phone as it's possible the logo cut-out renders the QR invalid.

3D

Generating the STL files for a 3D-printed QR code is very compute intensive. That means it's not reasonable to provide this functionality on the donation portal website. However, there is a script that generates everything with one command.

1. First clone the git repository

git clone git@github.com:noisebridge/donate-portal.git

2. Follow the setup instruction in the README.md. The project requires values for each environment variable in a .env file you must create in the repository root, but for the purpose of this script those values can all be bogus.

3. Run the script.

bun run generate-openscad-qr --amount 13.37 --text-lines '["Give a","Shit.","Donate"]' --name 'A Shit' --description 'You get what you give!'

There are a few constraints:

  • The script keeps the pixels in the QR code the same size as the pixels in the text, so it requires the QR code be of a certain width. You may need to add or remove data from the --name and --description parameters, which is encoded into the QR code.
  • The font has a limited character set. Only the upper/lower alphabet, numerals, $, /, :, . are supported.
  • The text lines can only be so long. The hard-coded limit is 9 characters per line but that does not guarantee the text fits.

This takes about 5 minutes on my computer so give it some time. The entire process is single-threaded, so feel free to run multiple at once.

4. You should now have 3 STL files in scripts/openscad/qrs named something-black.stl, something-red.stl and something-white.stl. Import these STLs into your 3D slicer as one object with multiple parts and assign each part a filament of an appropriate color.

Specifically for Bambu Studio:

  • File > Import > Import 3MF/STL/STEP/SVG/OBJ/AMF/...
  • Select all 3 STL files
  • Select "Yes" when asked "Load three files as single object with multiple parts?"
  • Add 3 filaments (ex: "Generic PLA"). One for red, black and white.
  • In the "Objects" panel expand your object in the list and assign the colors to the 3 parts (you can do this with the numbers on your keyboard that correspond to the filaments).
  • In the "Global" settings panel go to Strength > Sparse Infill Density and set to "100%". This helps with materials that can be slightly translucent so you can't see the infill pattern.

5. Flip the objects upside-down. The print quality is much higher when the display side of the print is pressed into the print bed.