diff --git a/taiko/.gitignore b/taiko/.gitignore index bc6592a..82a2a19 100644 --- a/taiko/.gitignore +++ b/taiko/.gitignore @@ -1,4 +1,7 @@ .pio CMakeListsPrivate.txt cmake-build-*/ -.idea \ No newline at end of file +.idea + +.DS_Store +._* \ No newline at end of file diff --git a/taiko/README.md b/taiko/README.md new file mode 100644 index 0000000..e216970 --- /dev/null +++ b/taiko/README.md @@ -0,0 +1,43 @@ +# Taiko-stick / 太鼓槌 + +A pair of drumsticks that can be used to play Taiko no Tatsujin on any surface. + +一对可以在任何表面上打太鼓达人的鼓槌. + +## 1. Build / 制作 + +### Materials Required / 材料 + +* 2x Thick-enough drumsticks +(The one I used: [taobao link](https://item.taobao.com/item.htm?id=665108049486)) +* 2x Piezo sensors (压电/蜂鸣陶瓷片) +* 2x 1MΩ resistors +* 1x Arduino Nano +(or any other dev board, just change the platformio config) +* Many wires + +### Tools Required / 工具 + +* Either a breadboard, SPL2 solder-less connectors, or a soldering kit +* A computer + +### Connections / 连接 + +![img.png](doc/img.png) + +## 2. Run / 运行 + +### Flash Firmware / 烧录固件 + +1. Install PlatformIO Core ([Guide](https://platformio.org/install/cli)) +2. Connect the Arduino Nano to your computer +3. Upload firmware using `platformio run --target upload` + +### Run Backend / 运行后端 + +I'm too lazy to write a HID device driver, so I'm using a python script to read the serial output from the Arduino and send keystrokes to the computer. + +1. Install Python 3.11+ ([Guide](https://www.python.org/downloads/)) +2. Install dependencies using `pip install -r requirements.txt` +3. Run `python reader.py` +4. Use `Ctrl+C` to exit. diff --git a/taiko/doc/img.png b/taiko/doc/img.png new file mode 100644 index 0000000..ef0cd9b Binary files /dev/null and b/taiko/doc/img.png differ