Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 4.46 KB

File metadata and controls

82 lines (66 loc) · 4.46 KB

STM-C4 Ver4.0

English | 简体中文

GitHub License: MIT YouTube bilibili

An STM32F103C8T6-based CS2 C4 appearance model (V4.0). About 95% visual accuracy. Compared to the previous version, this revision optimizes the LCD ribbon width, uses multi-color LEDs, adds a passive buzzer for distinct tones, and introduces an external defuser option. The hardware integrates the power circuit and uses a PCB-mounted controller instead of a full dev board. On the software side, the countdown uses a more accurate formula, smoother animations, and more configurable options with a more authentic LCD effect.

GitHub repo (firmware/docs): https://github.com/AzidoPP/STM-C4
OSHWHUB hardware page: https://oshwhub.com/azidopp/CS2-C4

Real Picture

Picture

Quick Start

  1. PCB fabrication
  2. BOM purchase
    • BOM file: BOM/BOM.xlsx
    • 9V alkaline batteries are recommended for more stable current output
  3. Soldering & assembly
    • LCD1601 adapter soldering example: LCD1601 adapter pic1 LCD1601 adapter pic2 LCD1601 adapter pic3
    • 3D printed shell/fillers (optional): see 3DP_Models
    • Fully assembled board: Full assambled board
  4. Flash firmware
    • Keil project: Keil_proj/c4
    • ST-Link V2 header location: ST-Link header pic3
    • Pin order: 3.3V / SWDIO / SWCLK / GND
    • After flashing the firmware, if the LCD1601 shows no text, rotate the potentiometer in either direction to adjust the display contrast until the text is clear. potentiometer
  5. MP3 audio (optional)
  6. Configuration and tuning
    • User guide: CONFIG.md
    • Default configuration source: config.h
    • Supports single-item configuration update without reflashing (hold # during power-on)
    • Added digital countdown toggle: CONFIG_DIGITAL_COUNTDOWN_ENABLE

Basic Gameplay

  • Startup uses buzzer only (no MP3), while LED breathes in yellow.
  • Enter any 7-digit code as the “plant” password.
  • After entry, the countdown starts (default 15s, configurable); the LED and buzzer become more urgent.
  • During the countdown, there are three defuse methods:
    • Password defuse: enter the same password again to defuse successfully.
    • Manual defuse: long press # to start; succeed after 10 seconds.
    • External defuser: when the external defuse input is active, hold for 5 seconds to succeed.
  • Defuse-success sequence: defuse-success cue (separate toggle) -> (optional) CT music box -> (optional) CT win announcement.
  • Explosion sequence:
    • With T music box enabled: play integrated explosion+music-box track -> (optional) T win announcement.
    • Without T music box: play pure explosion track -> (optional) T win announcement.

Configuration

Detailed Docs

For deeper details and theory, see the Chinese technical document: V4说明.md

Disclaimer

This project is a visual/electronic replica and does not have any real functionality or danger.
Any modification, misuse, or illegal use is not associated with the author, and the author assumes no liability.