You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got my own (ESP32-C6 only) code up here, but struggled quite extensively in detaching the logic from each other. I wanted to:
detach the "measuring" (data input) from BLE notifications
detach each service from the BLE server
I'll walk you through the current design construction, and then ask advice on the remaining (only one) "hot spot". :)
Files
examples/
└── y-emb
├── boot_btn_ble.rs # BLE details for the button (service and characteristic)
├── boot_btn_task.rs # feeds a Signal from the BOOT button on the devkit
├── config.in # some constants
├── main.rs # entry point; hw initialization
└── server_ble.rs # most of the BLE stuff
boot_btn_feed is actually an async poll for the next true/false value, ready to be placed for BLE notification
&server.bb.state is needed, because I didn't find a way to make code within the service/characteristic file (boot_btn_ble.rs) to reach its own .state characteristic. Need to study the macro expansions to understand how everything works...
access to serverand conn are needed, for placing a notification
The existing TrouBLE examples don't suffer of this, mostly because they don't even try to detach the Server and Services/Characteristics from each other.
The text was updated successfully, but these errors were encountered:
I got my own (ESP32-C6 only) code up here, but struggled quite extensively in detaching the logic from each other. I wanted to:
I'll walk you through the current
designconstruction, and then ask advice on the remaining (only one) "hot spot". :)Files
Remaining trouble pun
The construction on this line is a hack.
boot_btn_feed
is actually an async poll for the nexttrue
/false
value, ready to be placed for BLE notification&server.bb.state
is needed, because I didn't find a way to make code within the service/characteristic file (boot_btn_ble.rs
) to reach its own.state
characteristic. Need to study the macro expansions to understand how everything works...server
andconn
are needed, for placing a notificationThe existing TrouBLE examples don't suffer of this, mostly because they don't even try to detach the Server and Services/Characteristics from each other.
The text was updated successfully, but these errors were encountered: