Note: To access all shared projects, get information about environment setup, and view other guides, please visit Explore-In-HMOS-Wearable Index.
MorseGuard is a HarmonyOS-based wearable game designed for Huawei Watch 5. Players guess letters represented by Morse code vibration patterns. Each correct guess increases their score, and reaching 100 points wins the game. The app uses haptic feedback, random letter generation, and simple gesture interaction to create an engaging learning experience.
- Educational Game: Learn and practice Morse code through interactive play.
- Cognitive Training: Improve reaction time and memory by recognizing vibration patterns.
- Wearable Interaction Demo: Showcases the use of haptics and motion sensors on HarmonyOS devices.
Languages: ArkTS
Framework: HarmonyOS SDK 5.1.0(16)
Tools: DevEco Studio Version 5.1.0.842
Libraries/Kits:
- Haptic Kit (vibration patterns)
- Sensor Kit (motion/accelerometer for shake-to-clear)
- AbilityKit & Router (page navigation)
- PromptAction (toast messages)
ohos.permission.ACCELEROMETERohos.permission.ACTIVITY_MOTIONohos.permission.GYROSCOPEohos.permission.READ_HEALTH_DATA
MorseGuardApp/
├── pages/
│ ├── HomePage.ets # Landing screen
│ ├── GamePage.ets # Main gameplay (Morse vibration, scoring, letter choices)
│ ├── WinPage.ets # Win screen with final score and replay option
├── services/
│ ├── HapticService.ets # Wrapper around vibrator APIs
│ ├── MorseEngine.ets # Morse code dictionary and distractor logic
│ ├── PatternPlayer.ets # Plays Morse patterns as haptic sequences
├── components/
│ └── DotDashPad.ets # Optional practice pad for dot/dash input
- Huawei Watch 5
MorseGuard is distributed under the terms of the MIT License.
• See the LICENSE for more information



