top of page

Making QR Codes with Python

We teach and learn by making !


At Haruki Robotics Lab, students explore how coding connects technology to everyday life. In this project, we use Python to create custom QR codes that can link to websites, files, or any digital resource. Parents can easily try this at home too, making it a perfect family coding activity.


ree

Python Code

import qrcode

url = input("Enter a link: ")
fileName = input("Enter a filename: ")
img = qrcode.make(url)
img.save(f"{fileName}.jpg")

How it Works 🌍

  • Step 1: Enter a website link (for example, your school homepage).

  • Step 2: Give your QR code a filename.

  • Step 3: Python creates an image file you can open or share.

  • Step 4: Scan the QR code with any smartphone camera to test it.



Learning Goals

Students will see how data becomes images, and how simple programs can have real‑life applications. This exercise introduces the concept of encoding information, which is a key idea in both computing and robotics.


Next Steps

  • Add colors and styles to the QR code.

  • Create QR codes for project portfolios or robot demonstration videos.

  • Combine with the news or weather projects to share daily results as QR codes.


At Haruki Robotics Lab, we teach and learn by making. Even a small project like this helps students understand how coding can bridge the digital world with the physical one.

Comments


bottom of page