Traffic Light Board
RGB style traffic LEDs plus S3 button control.
An OpenHarmony-based Hi3861 embedded project covering traffic light, colorful light, environment monitoring, and AT command modules.
RGB style traffic LEDs plus S3 button control.
Buzzer and RGB synchronization with sensor fusion.
MQ 2, AHT20, OLED and alarm pipeline.
Custom AT command and serial communication flow.
This project organises OpenHarmony embedded exercises on the Hi3861 into four tracks: a traffic-light state machine, lighting with buzzer coordination, environmental data acquisition, and custom AT commands. Each track first implements control of a single peripheral, then combines it with other modules. Together the four scenarios cover input, processing and output.
A common situation in embedded learning is knowing each peripheral individually but lacking experience in organising them into a complete system. This project arranges GPIO, PWM, sensors and serial communication into a learning path of four independently runnable scenarios, ordered by difficulty.
The traffic light uses a state machine to switch between signals and detect illegal horn use; the lighting track generates light effects through PWM and coordinates them with a buzzer; environmental monitoring samples temperature, humidity and light over ADC and I²C and displays them on an OLED; the AT command track extends the serial port into a customisable command interface.
A Hi3861 development board with OpenHarmony LiteOS-M, developed in C, covering GPIO, PWM, ADC, I²C and an OLED display, as well as UART serial communication.
Choose a board following the module order on this page, check the pin assignments and peripherals, then open the corresponding README for the source layout and build steps. A full README reading page is also provided; reproducing the physical results requires the matching board and components.
Modular directories for independent activation and testing.
Hi3861 rayawa hello traffic_light colorful_light environment at_command demolink iothardware samgr startup
GPIO output and button input collaboration.
light.c → traffic.c → ability.c → button.c → control.c
Audio, lighting, and sensing integration.
beep.c → music.c → led.c → human_sensor.c → photosensitive.c → human_sensor_light.c
Sensor collection, OLED display, threshold alarm.
Custom command registration and serial response.