From a1777c1d5fc224839bbc40f8b9ca51a9d7ac1f77 Mon Sep 17 00:00:00 2001 From: my Date: Tue, 15 Sep 2026 16:41:53 +0200 Subject: [PATCH] add tones to readme. --- README.md | 22 ++++++++++++++++++---- platformio.ini | 6 ++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8172494..5dd9256 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ All the mesh chat functionality was directly ported from https://github.com/7h30 ## Hardware -- **Board**: We used a non-standard CYD variant; [1005008564907457] from Aliexpress, 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. +- **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. 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 @@ -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 ` in the app also updates this. | | `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. | | `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 | |---|---| @@ -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 ` (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 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 | | `/clearnotes` | Erase all saved notes | | `/set ` | Change a color setting; saved to `config.txt`, visible after sleep/restart | +| `/set ` | Change a tones setting; saved to `config.txt`, audible after sleep/restart | | `/bt` | Toggle BT send mode (see below) | | `/sleep` | Put the device to deep sleep (wake via BOOT button or touch7) | | `/help` | List commands on-device | diff --git a/platformio.ini b/platformio.ini index 4a5bfe5..42c1088 100644 --- a/platformio.ini +++ b/platformio.ini @@ -31,12 +31,10 @@ lib_deps = build_flags = -DLV_CONF_INCLUDE_SIMPLE -I include - ; use strchr instead of strchr_P - -Dstrchr_P=strchr - ; We only need HID peripheral from NimBLE - ; saving some memory here. + ; NimBLE takes up too much memory, disable what we dont need. -DCONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED -DCONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED + -include src/meshberry/compat.h [env:evilchat-relay] platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip