Example Code for Using the On-board RGB LED
Last revision 2026/01/05
This article guides you through programming the on-board RGB LED using Mind+ software on the UNIHIKER M10 expansion board. It covers hardware installation, software setup, and provides Python code to create a sequence of flashing red, green, and blue lights.
Hardware Preparation
Software Preparation
According to the Getting Started section in the UNIHIKER official documentation, it is recommended for beginners to operate according to the instructions in the Mind+ section. [Click to view]
The main process is: download and install MInd+ on your PC, open Mind+, switch to Python mode and Code page, click on the icon in front of Terminal, open the Connect Remote Terminal menu, and then connect the UNIHIKER. After that, you can create a new py file in the File System, write code and run.

Wiring Diagram

Sample Code
# -*- coding: UTF-8 -*-
# MindPlus
# Python
import time
from pinpong.board import Board,Pin,NeoPixel
from pinpong.extension.unihiker import *
Board().begin()
np1 = NeoPixel(Pin((Pin.P13)),3)
np1.brightness(128)
while True:
np1.range_color(0,2,0xFF0000)
time.sleep(1)
np1.range_color(0,2,0x00FF00)
time.sleep(1)
np1.range_color(0,2,0x0000FF)
time.sleep(1)
Result
The light blinks in the order of red, green, and blue with a one-second interval.

Was this article helpful?
