UNIHIKER M10 kit and swag - element14 Community
UNIHIKER M10 Kit description and general information - element14 Community
Hello all,
This is the third post regarding the Unihiker M10, in which I will detail the most user-friendly method for exploring this board: Jupyter Notebook.
Without further ado, let’s get started.
What is Jupyter Notebook?
Jupyter Notebook is an interactive development environment that allows for writing and executing Python code directly within a browser. The code is organized into "cells" that can be run individually, with the results displayed immediately below each cell.
Unlike traditional development using .py files, Jupyter offers the ability to combine:
- Python code;
- documentation and explanations;
- images;
- graphs;
- experimental results.
This makes it ideal for learning, prototyping, and documenting projects.
Why is it useful on the UNIHIKER M10?
The UNIHIKER M10 is a platform geared toward education and rapid prototyping. Jupyter Notebook enables:
- rapid testing of integrated sensors;
- verification of GPIO functionality;
- data visualization via graphs;
- incremental application development;
- straightforward program debugging.
Instead of writing a complete program and running it from scratch every time, you can test each feature individually.
UNIHIKER M10 comes with the Linux operating system and the Jupyter Notebook service preinstalled. No additional software needs to be installed on your computer to connect; a web browser is all that is required. The Jupyter service is disabled by default and must be enabled via the board's web interface.
Here is the DFRobot guide for connecting to Jupyter Notebook on the Unihiker M10 using a PC: DFRobot guide
Step 1: Connecting the board
Connect the UNIHIKER M10 board to the computer using the USB Type-C cable. Once powered on, the board is recognized by the system as a network adapter and is automatically assigned the fixed IP address 10.1.2.3.
Step 2: Accessing the web interface
After connecting, open a web browser and enter the address: http://10.1.2.3 This opens the board's local administration page, which provides access to network configuration, file management, and the activation of available services.
Step 3: Activating the Jupyter service
Check the status of the Jupyter service via the Application Services (or Service Toggle) menu. If it is stopped, click the Start button and wait until the status changes to Enabled. You can then select Open Page to launch the Jupyter Notebook interface.
Alternatively, once the service has been activated, Jupyter can be accessed directly at: http://10.1.2.3:8888 after activating the service.
Activate Jupyter Notebook from the Unihiker M10 menu:
->
->
-> 
Connect the Unihiket M10 to PC using USB Type-C cable and activate Jupyter Notebook from browser:
-> 
Connecting via Wi-Fi
UNIHIKER can also operate over a Wi-Fi network. In the "Network Settings" section of the web interface, you can select your wireless network and enter the password. Once connected, the board will receive an IP address from the router. This address can be viewed in the board's main menu and used to access Jupyter Notebook from any device on the same network. Connecting via a web browser is one of the simplest ways to program the UNIHIKER M10. There is no need to install a complex development environment; users can write and execute Python code directly on the board, with immediate access to its integrated sensors and peripherals. This workflow is ideal for learning, conducting quick experiments, and developing prototypes.
IP address set after the Unihiker is connected to PC using USB Type-C cable:
-> 
Access Jupyter Notebook from browser, from PC, from IP :

Examples
01. "Hello Unihiker"
The first test could be this: displaying a simple piece of text, for example: "Hello Unihiker". To do this, in Jupyter Notebook, click on "New" on the right-hand side and select "Python 3 (ipkernel)"; a new window will open, in which we will type `print("Hello UNIHIKER")` and then click the "Run" button. The result will be displayed in the same window, below our code.

To display text on the Unihiker M10 screen, the `gui` object from the `unihiker` library must be used:
from unihiker import GUI
gui = GUI()
gui.draw_text(
text="Hello UNIHIKER",
x=25,
y=120,
font_size=16
)

02. Read light sensor
To read the onboard light sensor, we have to run the following example code:
from unihiker import GUI
from pinpong.board import Board
from pinpong.extension.unihiker import *
Board().begin()
light.first_flag = True
gui = GUI()
value = light.read()
gui.draw_text(
text="Light: " + str(value),
x=20,
y=100,
font_size=24
)
OBS: If code is already running and you attempt to execute another piece of code from Jupyter, you will encounter an error—specifically a `RuntimeError` (traceback: most recent call last). To avoid this, you must reinitialize the kernel before running any further code: select "Restart" or "Restart & Clear Output" from the Kernel menu.
03. Read all sensors and buttons
Presented here is a dashboard that displays data from the light sensor, accelerometer, gyroscope, and the two configurable buttons, A and B:
from unihiker import GUI
from pinpong.board import Board
from pinpong.extension.unihiker import *
import time
# Initializare
Board().begin()
light.first_flag = True
accelerometer.first_flag = True
gyroscope.first_flag = True
# GUI
gui = GUI()
# Titlu
title = gui.draw_text(
text="UNIHIKER M10",
x=10,
y=5,
font_size=10
)
# Lumina
txt_light = gui.draw_text(
text="Light:",
x=10,
y=25,
font_size=10
)
# Accelerometru (coloana stanga)
txt_acc = gui.draw_text(
text="ACC",
x=10,
y=50,
font_size=10
)
# Giroscop (coloana dreapta)
txt_gyro = gui.draw_text(
text="GYR",
x=120,
y=50,
font_size=10
)
# Butoane
txt_buttons = gui.draw_text(
text="BTN",
x=10,
y=120,
font_size=10
)
while True:
# Lumina
txt_light.config(
text=f"Light: {light.read()}"
)
# Accelerometru
txt_acc.config(
text=
f"ACC\n"
f"X:{accelerometer.get_x():.2f}\n"
f"Y:{accelerometer.get_y():.2f}\n"
f"Z:{accelerometer.get_z():.2f}"
)
# Giroscop
txt_gyro.config(
text=
f"GYR\n"
f"X:{gyroscope.get_x():.3f}\n"
f"Y:{gyroscope.get_y():.3f}\n"
f"Z:{gyroscope.get_z():.3f}"
)
# Butoane
a_state = "ON" if button_a.is_pressed() else "OFF"
b_state = "ON" if button_b.is_pressed() else "OFF"
txt_buttons.config(
text=
f"Button A: {a_state}\n"
f"Button B: {b_state}"
)
time.sleep(0.5)
Video demonstration:
See you in the next post!