|
1 | 1 | # BUZZER PIANO |
2 | 2 |
|
3 | | -**A computer-controlled virtual piano that plays sound through a microcontroller-driven piezo buzzer over a USB serial connection.** |
4 | 3 |
|
5 | | -The system is split into two parts: |
6 | | -- **Desktop application** — Graphical piano interface and serial controller |
7 | | -- **MCU Micropython script** — Receives note data and generates sound using PWM |
| 4 | +**Play piano on a physical piezo-electric passive buzzer using a serial-connected MCU.** |
8 | 5 |
|
| 6 | +## Features |
| 7 | +- **Computer application** |
| 8 | + - Graphical piano interface and serial controller |
| 9 | + - Configurable number of piano octaves |
| 10 | +- **Microcontroller mpy script** |
| 11 | + - Receives note data and controls the buzzer |
| 12 | + - User-defined MCU pin via REPL on Linux |
9 | 13 |
|
10 | | -https://github.com/user-attachments/assets/6d5003f8-bf1f-4924-867a-da4762076cf4 |
11 | 14 |
|
12 | | -## Features |
13 | | -- Graphical piano interface |
14 | | -- Configurable number of piano octaves |
15 | | -- User-defined MCU pin via REPL (Linux) |
| 15 | +https://github.com/user-attachments/assets/6d5003f8-bf1f-4924-867a-da4762076cf4 |
16 | 16 |
|
17 | 17 | ## Running the project |
18 | 18 | ### MCU side |
19 | 19 | 1. Copy the **OS-appropriate** mcu.py as the main script on the board. |
20 | | -Exemple using mpremote: |
21 | | -```bash |
22 | | -mpremote cp mpy/mcu_linux.py :main.py |
23 | | -``` |
| 20 | + ```bash |
| 21 | + # example using mpremote, copying the linux script |
| 22 | + mpremote cp mpy/mcu_linux.py :main.py |
| 23 | + ``` |
24 | 24 | 2. Configure the GPIO pin used for the buzzer: |
25 | 25 | - **Linux** |
26 | 26 | - Open the REPL after flashing the script. |
@@ -62,18 +62,19 @@ mpremote cp mpy/mcu_linux.py :main.py |
62 | 62 | | Mpremote | 1.27 | Sending script to MCU |
63 | 63 | | Colorama | 0.4.6 | stdout coloring (debug) |
64 | 64 |
|
65 | | -Install dependencies: |
66 | 65 | ```bash |
67 | 66 | # Linux |
68 | 67 | python -m venv .venv |
69 | 68 | source .venv/bin/activate |
70 | 69 | pip install -r requirements.txt |
| 70 | +python main.py |
71 | 71 | ``` |
72 | 72 | ```pwsh |
73 | 73 | # Windows (Powershell) |
74 | 74 | python -m venv .venv |
75 | 75 | .venv\Scripts\activate |
76 | 76 | pip install -r requirements.txt |
| 77 | +python main.py |
77 | 78 | ``` |
78 | 79 |
|
79 | 80 | #### Or compile from source: |
|
0 commit comments