icon

13 Python Projects for Beginners with Source Code

Welcome to the UNIHIKER Python Programming Project Collection. In this series, we will use the most popular Python libraries (Pinpong, UNIHIKER, turtle, pygame, OpenCV, AIP, SIoT), combined with the single-board computer - UNIHIKER, to create a variety of fun Python projects. Whether you are a beginner who has just started learning Python programming or an experienced maker enthusiast, UNIHIKER will be your best hardware companion. Embark on your Python learning journey and explore the charm of Python programming and hardware interaction.

 

Introducing UNIHIKER

 

UNIHIKER is a single-board computer that brings you brand new experience.

 

It features a 2.8-inch touchscreen display, Wi-Fi and Bluetooth. It is equipped with light sensor, accelerometer, gyroscope and microphone. With built-in co-processor, it is able to communicate with various analog/digital/I2C/UART/SPI sensors and acuators.

 

UNIHIKER brings a whole new experience for developers with its pre-installed software, allowing for an incredibly fast and easy start. Featuring a built-in Jupyter Notebook (a browser-based programming environment), developers can program the single board computer using a smartphone or tablet. Of course, just like other single board computers, UNIHIKER also supports VS Code, VIM, and Thonny. The integrated Pinpong control library allows developers to directly control UNIHIKER's built-in sensors and hundreds of connected sensors and actuators using Python. The built-in SIoT service on UNIHIKER allows users to store data through the MQTT protocol and provides real-time web data access. The best part is that all data is stored within the device itself.

 

Compact, feature-rich, and user-friendly, UNIHIKER offers an innovative development experience for learning, coding, and creating.

 

Unleash your imagination and embark on a new journey with UNIHIKER.

 

What can UNIHIKER do?

 

On UNIHIKER, you can run popular Python libraries such as Pinpong, UNIHIKER, turtle, pygame, OpenCV, AIP, SIoT, and more. The combination of UNIHIKER and Python programming offers a wealth of possibilities, allowing you to develop even more interesting projects based on your creativity and needs.

 

Color Screen Display: UNIHIKER comes with a 2.8-inch color touchscreen display. You can use Python programming to display text, images, emojis, and more on the screen. For example, you can write code to create a clock application that beautifully displays the current time in various fonts.

 

Hardware Control: UNIHIKER is equipped with various sensors and actuators that you can control using Python programming. For instance, you can write code to control the on/off state of LED lights, switch water pumps, read data from light sensors, three-axis acceleration sensors, and more. This allows you to create a wide range of interactive hardware projects.

 

Touchscreen Interaction: UNIHIKER features a touchscreen display that enables interaction. With Python programming, you can not only display text, emojis, and graphics on the screen but also implement touch-based interaction. For example, you can write code to create a game interface where users can perform game actions through touch, such as tapping. This allows you to recreate classic games like Sudoku, Snake, or design your own innovative games.

 

Building IoT Applications: UNIHIKER supports SIoT (Smart Internet of Things) services, allowing you to build IoT systems using Python programming. By connecting various sensors and actuators, you can collect and transmit data, enabling communication and collaboration between devices. For example, you can create a smart agriculture system using UNIHIKER and Python programming to remotely control water pumps and monitor environmental data.

 

Unlocking UNIHIKER: How to Program the UNIHIKER

 

With UNIHIKER, you can start learning Python in just two steps. Whether you are a beginner or an experienced programmer, UNIHIKER is suitable for you. UNIHIKER supports two different programming methods: "Python Code" and "Python Blocks".

 

Python Code: Users with Python experience can choose a programming platform that suits their habits, such as jupyter notebook, VSCode, Thonny, Mind+, etc.

 

Python Blocks:For beginners, it is recommended to use Mind+(similar to Scratch) for programming UNIHIKER in Python Blocks. Mind+ supports one-click connection, file management, block and code programming modes.

 

If you are just starting to learn Python programming, we recommend starting with Python Blocks programming. Here, we have compiled 10 interesting UNIHIKER Python code programming projects that combine Python code programming with hardware to help you discover new ways of innovation.

 

Project 1:Introduction to the UNIHIKER

Project Description: When the power of UNIHIKER meets Python, you can leverage the UNIHIKER's large screen and Python's powerful programming capabilities to display Chinese characters, English characters, and emojis in a colorful and vibrant way on the UNIHIKER's screen.

 

The Python libraries used in the project include:

 

unihiker:To facilitate the use of UNIHIKER main controller, a Python library called "unihiker" has been developed. For example, to facilitate screen display and control, a GUI class based on the tkinter library has been encapsulated in the unihiker library. Similarly, an Audio class has been encapsulated in the unihiker library to facilitate the use of microphone and USB speakers.

HARDWARE LIST
1 UNIHIKER

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 2:Little Light Sensor

 

 

Project Description: Through this project, you will learn how to use the Pinpong library to enable the light sensor on the UNIHIKER and create a UNIHIKER light meter. What's even more interesting is that you can use Python programming to divide the intensity of light into four levels and display different brightness levels of small light background images on the UNIHIKER screen according to the different ambient light intensities.

 

The Python libraries used in the project include:

 

unihiker

 

Pinpong:The design of the Pinpong library aims to free developers from the constraints of complex hardware models during the development process, allowing them to focus on software implementation. With the Pinpong library, you can directly use Python code to program various common open-source hardware.

HARDWARE LIST
1 UNIHIKER

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 3:Multifunctional Reminder

 

Project Description: With this Multifunctional Reminder, you will gain a better understanding of how to utilize the sensors on the UNIHIKIER with the Pinpong library! This project involves two sensors, the microphone and the buzzer, with the microphone being used to monitor ambient noise in real time and the buzzer used to emit alert sounds.

 

The Python libraries used in the project include:

 

unihikerPinpong

HARDWARE LIST
1 UNIHIKER

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 4:Simulating a Starry Sky

 

Project Description: With this project, you will learn how to use the turtle library to draw star patterns on the UNIHIKER screen. No matter where you are, you can enjoy the starry sky. The essence of this project is to use the turtle library to draw small star patterns and change their positions, creating the effect of stars floating on the UNIHIKER screen.

 

The Python libraries used in the project include:

 

turtle:Turtle is a graphics drawing library that provides a set of simple drawing commands to create various shapes and patterns by controlling a graphical turtle.

HARDWARE LIST
1 UNIHIKER

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 5:2D Maze

Project Description: Through this project, you will learn how to use the Three-Axis Accelerometer Sensor on the UNIHIKER to control a character drawn by the turtle library. By combining the Three-Axis Accelerometer Sensor with the turtle library, players can tilt the UNIHIKER board to control the character's exploration in the maze and find the exit.

 

The Python libraries used in the project include:

 

Pinpong、turtle

HARDWARE LIST
1 UNHIKER

If you are interested in this Python project you can click to view the complete tutorial.

 

Project 6:Snake Game

 

Project Description: Through this project, you will learn how to create a snake game using the Pygame library and play it on your own UNIHIKER. The key to this project is to use the Pygame library to create a game window on the UNIHIKER screen and draw the game's graphical elements, including the character and food. Then, you can use the A button on the UNIHIKER to move the character up, down, left, and right in the game.

 

The Python libraries used in the project include:

 

Pinpong

 

pygame:The Pygame library is an open-source library for developing games and multimedia applications based on Python. It provides a range of powerful tools and interfaces for handling graphics, audio, input devices, and more, allowing developers to create various types of games and interactive applications.

HARDWARE LIST
1 UNIHIKER

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 7:Schulte Grid Game

Project Description: Do you think the screen of UNIHIKER can only be used for display? This project utilizes the Pygame library to achieve mouse interaction on the UNIHIKER screen, creating a clicking game that can train attention. When the game starts, the timing function is activated, and the player's click position on the UNIHIKER screen is used to determine whether the target square has been clicked. When the game ends, the timing result is displayed.

 

The Python libraries used in the project include:

 

Pygame

HARDWARE LIST
1 UNIHIKER
1 USB speaker

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 8:Smart Agriculture Visualization System

Project Description: The project focuses on using UNIHIKER as a smart agriculture visualization system, which monitors the growth of crops in real time and scientifically waters them. By utilizing soil moisture sensors, relays, and water pumps, the growth environment of crops can be monitored and improved, effectively solving the problem of watering crops.

 

The Python libraries used in the project include:

 

unihikerPinpong

HARDWARE LIST
1 UNIHIKER
1 Analog Soil Moisture Sensor
1 Easy Relay Module
1 DC Water Pump
1 6xAA Battery Holder with DC2.1 Power Jack

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 9:Smart Agriculture IoT System

Project Description: Through this project, you will learn how to activate the UNIHIKER's SIoT service using the SIoT library and build an IoT system. This project involves the UNIHIKER communicating with an IoT platform via WiFi and connecting to a soil moisture sensor, relay, and water pump as a smart terminal. It detects soil data and uploads it to the SIoT platform. The SIoT platform acts as a server, collects the received soil moisture data, and remotely sends "on/off" instructions to control the smart terminal's water pump to irrigate or stop watering.

 

The Python libraries used in the project include:

 

unihikerPinpong

 

SIoT:For UNIHIKER, the SIoT application has been pre-installed on the board, and to facilitate its use, a Python library named "SIoT" has been developed. The purpose of this library is to connect to the MQTT server and implement message transmission by writing Python programs.

HARDWARE LIST
1 UNIHIKER
1 Analog Soil Moisture Sensor
1 Easy Relay Module
1 DC Water Pump
1 6xAA Battery Holder with DC2.1 Power Jack

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 10:Multi-Node Intelligent Agricultural System

Project Description: In this project, you will learn how to build a multi-node IoT system using multiple UNIHIKER, and establish communication between UNIHIKER and other devices. UNIHIKER can communicate with the SIoT platform through the SIoT library. Additionally, they can communicate with each other through WiFi connections on the same local area network. Furthermore, UNIHIKER can send warning messages to mobile devices via email using the smtplib library.

 

The Python libraries used in the project include:

 

unihikerPinpong、SIoT

 

smtplib:The smtplib library is used to send emails via the Simple Mail Transfer Protocol (SMTP). It offers a set of functions and classes to establish a connection with the mail server and send emails to designated recipients.。

HARDWARE LIST
3 UNIHIKER
1 Analog Soil Moisture Sensor
1 Easy Relay Module
1 DC Water Pump
1 6xAA Battery Holder with DC2.1 Power Jack
1 Digital piranha LED module

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 11 Chameleon Screens

Project Description: In this project, you will learn how to read and parse data from a color sensor, and convert the data into a recognizable format. You will also explore image processing techniques using the OpenCV library, such as color space conversion, pixel manipulation, etc., to achieve color matching for a chameleon character. Throughout this process, you will experience the fascinating fusion of Python programming and image processing.

 

The Python libraries used in the project include:

 

Pinpong

 

OpenCV:OpenCV is a powerful computer vision library that provides a wide range of image processing and computer vision algorithms. It is used for the development and research of various visual tasks. OpenCV is widely applied in fields such as image processing, computer vision, robotics, and more.

HARDWARE LIST
1 UNIHIKER
1 TCS34725 RGB Color Sensor

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 12 Magic Face Mask for Face Detection

Project Description: This project will utilize the powerful OpenCV library and the versatile PIL library to bring you a whole new camera experience. The core of this project is to use the OpenCV library to read the live feed from a USB camera and detect faces. Then, combining it with the PIL library, unique special effects images will be added to each detected face.

 

The Python libraries used in the project include:

 

Pinpong、OpenCV

PIL (Python Imaging Library): PIL, which stands for Python Imaging Library, is a Python library used for image processing. It offers a wide range of image manipulation and processing capabilities, allowing you to open, create, edit, and save various image formats.

 

HARDWARE LIST
1 UNIHIKER
1 0.3 MegaPixels USB Camera

If you are interested in this Python project, you can click to view the complete tutorial.

 

Project 13 Intelligent Access Control with Facial Recognition

 

Project Description: This project harnesses the powerful functionalities of OpenCV and the OS library to achieve real-time display of USB camera footage, facial recognition, and servo motor control. With the help of the OS library, seamless communication with the USB camera is easily established, allowing for the real-time reception of camera footage data. Additionally, based on the facial recognition results, the servo motor can be controlled to simulate the opening of the door.

 

The Python libraries used in the project include:

 

Pinpong、OpenCV、PIL

 

OS:The OS library is used to interact with the operating system and manage computer system resources. It primarily facilitates communication with the operating system and implements functionalities such as process management, file system operations, network connections, and device control.

HARDWARE LIST
1 UNIHIKER
1 0.3 MegaPixels USB Camera
1 Servo

If you are interested in this Python project, you can click to view the complete tutorial.

 

License
All Rights
Reserved
licensBg
0