Hi3861

An OpenHarmony-based Hi3861 embedded project covering traffic light, colorful light, environment monitoring, and AT command modules.

01

Traffic Light Board

RGB style traffic LEDs plus S3 button control.

02

Colorful Light Board

Buzzer and RGB synchronization with sensor fusion.

03

Environment Monitor Board

MQ 2, AHT20, OLED and alarm pipeline.

04

AT Command Module

Custom AT command and serial communication flow.

Project Structure

Modular directories for independent activation and testing.

Hi3861
rayawa
hello
traffic_light
colorful_light
environment
at_command
demolink
iothardware
samgr
startup
01

Module 1 | Traffic Light Board

GPIO output and button input collaboration.

Hardware

  • Three color LEDs and S3 button

Projects

  1. light.c
  2. traffic.c
  3. ability.c
  4. button.c
  5. control.c

Learning Order

light.c → traffic.c → ability.c → button.c → control.c

02

Module 2 | Colorful Light Board

Audio, lighting, and sensing integration.

Hardware

  • RGB LED, buzzer, PIR sensor, photoresistor

Projects

  1. beep.c
  2. music.c
  3. led.c
  4. human_sensor.c
  5. photosensitive.c
  6. human_sensor_light.c

Learning Order

beep.c → music.c → led.c → human_sensor.c → photosensitive.c → human_sensor_light.c

03

Module 3 | Environment Monitor Board

Sensor collection, OLED display, threshold alarm.

Hardware

  • MQ 2, AHT20, OLED, flame sensor, buzzer

Projects

  1. mq2_demo.c
  2. aht20.c/.h
  3. aht20_demo.c
  4. oled_ssd1306.c/.h
  5. oled_demo.c
  6. enrionment_demo.c

Technical Features

  • I2C shared bus
  • ADC acquisition
  • Realtime OLED display
  • Threshold alarm
04

Module 4 | AT Command Development

Custom command registration and serial response.

Project

  1. cal.c with AT+CALC command

Example

AT+CALC=12,3

Build Flow

  1. Select module in rayawa/BUILD.gn
  2. Select source in module BUILD.gn
  3. Run hb build
  4. Flash with HiBurn
  5. Check UART output

Tech Stack

  • GPIO PWM I2C ADC
  • OpenHarmony CMSIS RTOS2 HiAT
  • GN Ninja hb
  • HiBurn UART tools