dclause/hermes-five

Add support for passive buzzers with note/melody playback

开放

#25 创建于 2025年6月15日

 (0 条评论) (0 个反应) (0 位负责人)Rust (1 个派生)auto 404
feature requestgood first issue

仓库指标

星标
 (37 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Motivation: Passive buzzers are commonly used for generating tones, beeps, or simple melodies in embedded systems. Supporting them would allow users to easily play musical notes or sound alerts using standard GPIO/PWM outputs.

Proposal: Introduce a passive buzzer (named Buzzer or Tone ?) component capable of:

  • Playing individual notes with configurable frequency and duration
  • Playing melodies based on a standard format (e.g., Robson Couto’s melody format)

Format Consideration: Robson Couto’s format (e.g., "NOTE_E5,8, NOTE_D5,8, NOTE_C5,4") is simple and Arduino-compatible. Alternative formats (e.g., RTTTL or Music Macro Language) can be evaluated for future extensibility.

Scope:

  • Buzzer abstraction over GPIO or PWM
  • Basic melody parser/interpreter
  • Non-blocking (task) playback support

Impact: Adds a new component. No impact on existing APIs.

Future Extensions:

  • Support for RTTTL or external melody files ?
  • Dynamic tempo changes ?

贡献者指南