add tones to readme.

This commit is contained in:
my 2026-09-15 16:41:53 +02:00
parent 02df479896
commit a1777c1d5f
2 changed files with 20 additions and 8 deletions

View file

@ -7,8 +7,7 @@ All the mesh chat functionality was directly ported from https://github.com/7h30
## Hardware ## Hardware
- **Board**: We used a non-standard CYD variant; [1005008564907457] from Aliexpress, mostly for the price and USB-C connector. The peripheral - **Board**: We used a non-standard CYD variant; [1005008564907457] from Aliexpress also known as E32R28T, mostly for the price and USB-C connector. The peripheral connectors are placed a little differently from the commonly documented ESP32-2432S028R. The pin configuration in this project is specific to this board and may not work on other CYD revisions without changes to the GPIO assignments.
connectors are placed a little differently from the commonly documented ESP32-2432S028R. The pin configuration in this project is specific to this board and may not work on other CYD revisions without changes to the GPIO assignments.
ESP32-32E/ESP32-D0WD-V3, no PSRAM, 320×240 ST7789 display, resistive touch. ESP32-32E/ESP32-D0WD-V3, no PSRAM, 320×240 ST7789 display, resistive touch.
- **Keyboard**: M5Stack CardKB v1.1, wired to the board's 1.25 mm - **Keyboard**: M5Stack CardKB v1.1, wired to the board's 1.25 mm
@ -41,10 +40,9 @@ All values have hardcoded defaults, so any key can be left out entirely.
|---|---| |---|---|
| `nick` | Set nickname. Max 15 characters, no spaces. `/nick <name>` in the app also updates this. | | `nick` | Set nickname. Max 15 characters, no spaces. `/nick <name>` in the app also updates this. |
| `brightness` | Backlight, 0 (off) - 255 (max). Default 200 | | `brightness` | Backlight, 0 (off) - 255 (max). Default 200 |
| `snd_msg_freq`, `snd_msg_ms` | Frequency and duration (ms) of the incoming-message beep. |
| `snd_sys_freq`, `snd_sys_ms` | Frequency and duration (ms) of the join/leave beep. |
| `touch_threshold` | Threshold for touch to wake on Touch7 pin. Higher = easier to trigger. Not recommended for now. | | `touch_threshold` | Threshold for touch to wake on Touch7 pin. Higher = easier to trigger. Not recommended for now. |
| `color_*` | 6-digit hex RGB (no `#`), same format as CSS, e.g. `ff0000` is red. See the table below for which UI element each one controls. | | `color_*` | 6-digit hex RGB (no `#`), same format as CSS, e.g. `ff0000` is red. See the table below for which UI element each one controls. |
| `tones_msg` and `tones_sys` | Set the new message and system message melodies in MML format, see below. |
| Color key | Controls | | Color key | Controls |
|---|---| |---|---|
@ -59,6 +57,21 @@ All values have hardcoded defaults, so any key can be left out entirely.
Colors can also be changed from the device itself with `/set <key> <hex>` Colors can also be changed from the device itself with `/set <key> <hex>`
(e.g. `/set color_bg ff0000`), see below. (e.g. `/set color_bg ff0000`), see below.
## Sounds
You can set the new message [`tones_msg`] and system message [`tones_sys`] sounds (like a new user entering the chat) using a MML music notation string using the `/set` command.
Example:
`/set tones_msg t300 o4`
The defaults are:
- New message: `t300 d8 a+4`, Tempo 300bpm, D for 1/8, A for 1/4
- System message: `t300 a8 d+4`, Tempo 300bpm, A for 1/8, D for 1/4
More information here: https://github.com/maxint-rd/MmlMusic
And to listen to a MML string: https://matarillo.github.io/mmlplayer/
## Chat commands ## Chat commands
Typed into the input line, same as any chat message: Typed into the input line, same as any chat message:
@ -71,6 +84,7 @@ Typed into the input line, same as any chat message:
| `/clear` | Clear the chat window | | `/clear` | Clear the chat window |
| `/clearnotes` | Erase all saved notes | | `/clearnotes` | Erase all saved notes |
| `/set <color_key> <hex>` | Change a color setting; saved to `config.txt`, visible after sleep/restart | | `/set <color_key> <hex>` | Change a color setting; saved to `config.txt`, visible after sleep/restart |
| `/set <tones_key> <tones>` | Change a tones setting; saved to `config.txt`, audible after sleep/restart |
| `/bt` | Toggle BT send mode (see below) | | `/bt` | Toggle BT send mode (see below) |
| `/sleep` | Put the device to deep sleep (wake via BOOT button or touch7) | | `/sleep` | Put the device to deep sleep (wake via BOOT button or touch7) |
| `/help` | List commands on-device | | `/help` | List commands on-device |

View file

@ -31,12 +31,10 @@ lib_deps =
build_flags = build_flags =
-DLV_CONF_INCLUDE_SIMPLE -DLV_CONF_INCLUDE_SIMPLE
-I include -I include
; use strchr instead of strchr_P ; NimBLE takes up too much memory, disable what we dont need.
-Dstrchr_P=strchr
; We only need HID peripheral from NimBLE
; saving some memory here.
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED -DCONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED -DCONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED
-include src/meshberry/compat.h
[env:evilchat-relay] [env:evilchat-relay]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip