@@ -156,6 +156,9 @@ WebScreen uses a JSON configuration file stored on the SD card as `/webscreen.js
156156 "background" : " #2980b9" ,
157157 "foreground" : " #00fff1"
158158 },
159+ "display" : {
160+ "brightness" : 200
161+ },
159162 "script" : " app.js"
160163}
161164```
@@ -169,6 +172,7 @@ WebScreen uses a JSON configuration file stored on the SD card as `/webscreen.js
169172| ** settings.mqtt** | ` enabled ` | Enable MQTT functionality | ` false ` |
170173| ** screen** | ` background ` | Background color (hex format) | ` "#000000" ` |
171174| | ` foreground ` | Text/foreground color (hex) | ` "#FFFFFF" ` |
175+ | ** display** | ` brightness ` | Display brightness (0-255) | ` 200 ` |
172176| ** Root** | ` script ` | JavaScript file to execute | ` "app.js" ` |
173177
174178### Example Configurations
@@ -374,6 +378,7 @@ WebScreen includes a comprehensive serial command system for interactive develop
374378/info - Show device information and version
375379/write <filename > - Interactive JavaScript editor
376380/load <script.js> - Switch to different JS application
381+ /brightness <0-255> - Set display brightness (no args to query current)
377382/reboot - Restart the device
378383```
379384
@@ -448,6 +453,7 @@ The firmware exposes numerous functions to your JavaScript applications. Some hi
448453- **HTTP:** `http_get()`, `http_post()`, `http_delete()` (all support custom ports like `http://host:port/path`), `http_set_ca_cert_from_sd()`, `parse_json_value()`
449454- **SD Card:** `sd_read_file()`, `sd_write_file()`, `sd_list_dir()`, `sd_delete_file()`
450455- **BLE:** `ble_init()`, `ble_is_connected()`, `ble_write()`
456+ - **Display:** `set_brightness()`, `get_brightness()`
451457- **UI Drawing:** `draw_label()`, `draw_rect()`, `show_image()`, `create_label()`, `label_set_text()`
452458- **Image Handling:** `create_image()`, `create_image_from_ram()`, `rotate_obj()`, `move_obj()`, `animate_obj()`
453459- **Styles & Layout:** `create_style()`, `obj_add_style()`, `style_set_*()`, `obj_align()`
0 commit comments