Lesson 1: Light Up the UNIHIKER M10

In most first Python lessons, teachers begin with a simple program that prints “Hello, Python!” — a classic first step in learning to program.
In hardware programming, the classic “Blink” example plays a similar introductory role. The first goal is simple yet exciting — to make an LED on your board blink from scratch.
Your journey of creativity begins with lighting up the UNIHIKER M10 — making your first LED blink marks the true start of your hardware adventure!

Goal

Make the indicator LED “L” on the back of the UNIHIKER M10 blink.

Get to Know

1.Understand digital signals
2.Learn the concept of digital output signals
3.Master the use of pins
4.Get to know the built-in LED on the UNIHIKER M10

Materials List

Hardware:

HARDWARE LIST
1 UNIHIKER M10
1 USB Cable

Software:
Mind+ Programming Software x1(download at https://mindplus.cc/en)

Hands-on Practice


On the back of the UNIHIKER M10, there’s a small indicator LED that can light up and blink.In this lesson, you’ll learn how to program it and control its behavior through two simple tasks.
Task 1: Light Up the LED—Turn on the indicator LED and make it stay lit.
Task 2: Make the LED Blink—Control the LED to blink continuously.


Task 1: Light up the LED


1.Hardware Connection


Connect the UNIHIKER M10 to your computer using the Type-C USB cable.

2.Software Preparation


Open Mind+ and follow the steps shown in the diagram to complete the software setup.

projectImage
3.Write a Program


The indicator LED “L” on the back of the UNIHIKER M10 is connected to pin P25. Drag the “Set Digital Pin25 Output” block under the “Python main program start” block to turn the LED on.
Note: For more details about pins, see Knowledge Base.

4.Run the Program


Click Run.Once the program runs successfully, the LED on the back of the UNIHIKER M10 will light up.

5.Have a try


Now that you’ve learned how to turn the LED on, try changing the program to turn it off.


Task 2: Make the LED Blink


1.Write a Program


Think about it—how can we make the LED blink? That’s right! Just turn it on for a while, off for a while, and keep repeating.
In the “forever”block, set digital pin P25 to HIGH and wait for 1 second, then set it to LOW and wait for another second.

2.Run the Program


Run the program and observe the LED on the back of the UNIHIKER M10.
It will turn on for one second, off for one second — blinking continuously like a tiny star.


3.Have a try


Why should the LED control code be placed inside the loop(forever block) instead of outside it?Try moving it and see what happens!


Knowledge Base


1.Understanding the UNIHIKER M10


The UNIHIKER M10 is a main controller designed for students to learn Python programming.
It comes with a built-in Linux operating system and Python environment, and includes pre-installed Python libraries.
The front features a 2.8-inch LCD color screen, allowing for UI design and creative projects.

The UNIHIKER M10 also includes built-in components such as a microphone, light sensor, Wi-Fi, Bluetooth, accelerometer, gyroscope, buzzer, and buttons.It provides various external interfaces, including Type-C, USB-A, I²C, microSD, edge connector, and I/O pins.
This makes it highly versatile and expandable for future projects.


UNIHIKER M10 Pins Description


Interface/On-board ComponentsCorresponding pin4-pin I²C pin × 2Independent I²C channel, not shared with onboard I²C components3-pin I/O pin × 4P21, P22, P23, P24LED lightP25BuzzerP26Press button AP27Button BP28Three-axis gyroscope/accelerometerI²C

Note: The gold-edge connector pins on the front of the UNIHIKER M10 are compatible with micro:bit.

For more details, please refer to the official documentation:
https://wiki.unihiker.com/jianjie

You’ll get a basic idea of the interfaces and onboard components here. We’ll learn how to use them in detail in later lessons.


2.Understanding Pins


Do you know what a pin is?
A pin is a small connector that links the UNIHIKER M10 to external components. You can think of it as a bridge that allows the board to receive information from the outside or control external devices.
The UNIHIKER M10 has a built-in indicator LED “L,” connected to pin P25. By setting the output of pin P25 to HIGH or LOW, you can turn the LED on or off.

3.What is a digital signal?


A digital signal is represented by a special set of data — 0 and 1 — used to describe the signal’s state. Here, 1 means there is a signal, and 0 means there is no signal. The reason 0 and 1 are used is that a circuit has only two states: connected or disconnected. When the output signal is 1, the circuit is connected; when it is 0, the circuit is disconnected.


Why does the LED light up when the digital pin P25 is set to HIGH, and turn off when it’s set to LOW?
In fact, what controls the LED’s on/off state is the digital output signal.
A digital output signal refers to the output of two voltage levels — HIGH and LOW — which correspond to the two circuit states: connected and disconnected.
Using the “Setting digital pin P25 output High” block connects the circuit and turns the LED on.
Using the “Setting digital pin P25 output Low” block breaks the circuit and turns the LED off.

4.Command Learning


Set digital pin block


This command is used to set the digital pin output to high or low.


Challenge


A blinking LED can create many interesting patterns by changing the interval between on and off states.
In daily life, we use switches to control lights — the UNIHIKER M10 has two buttons (A and B) that can work like switches too.
Try programming it so that:
Pressing button A turns the LED on
Pressing button B turns the LED off

License
All Rights
Reserved
licensBg
0