Tuesday, 3 May 2022

App Inventor with BLE

 In your App Inventor code you need to add:

otherwise your StringsReceived block will never receive anything.


  • RegisterForStrings – Registers to receive updates when one or more null-terminated strings from a connected BluetoothLE device are changed. Service Unique ID and Characteristic Unique ID are required. The utf16 parameter indicates whether the content should be decoded as UTF-16 (true) or UTF-8 (false) code points when converting to App Inventor strings. Whenever a change is received, the StringsReceived event will be run.

    Parameters:

    • serviceUuid (text) — The unique identifier of the service passed in the read or register call.
    • characteristicUuid (text) — The unique identifier of the characteristic in the read or register call.
    • utf16 (boolean) Interpret the string content as UTF-16 (true) or UTF-8 (false) code points.

call BluetoothLE1 RegisterForStringsserviceUuidcharacteristicUuidutf16

  • RequestMTU – Requests a new minimum transmission unit (MUT) for the BluetoothLE connection. This feature is only supported when both devices support Bluetooth 4.2 or higher. If the MTU is changed successfully, the MTUChanged event will be run. The default MTU is 20.

    This block is intended for advanced apps that need to change the size of the messages sent between the BLE devices. Most developers will not need to adjust this value.

    Parameters:

    • bytes (number) — The desired MTU size.

call BluetoothLE1 RequestMTUbytes


.kodular.io

Platformio ESP32 BLE config.



;debug_tool = esp-prog

;debug_init_break = tbreak setup 

[env:esp32dev]

platform = espressif32

board = esp32dev

framework = arduino

monitor_speed = 115200

upload_speed = 921600


lib_deps = 

nkolban/ESP32 BLE Arduino@^1.0.1

t-vk/ESP32 BLE Keyboard@^0.3.2

Tuesday, 26 April 2022

PlatformIo with ESP32 JTAG DEBUG

 [env:esp32dev]

platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600

debug_tool = esp-prog
debug_init_break = tbreak setup

JavaFX with webview

 --module-path d:/Project/Win/javafx-sdk-15.0.1/lib/ 

--add-modules=javafx.swing,javafx.graphics,javafx.fxml,javafx.media,javafx.web 

--add-reads javafx.graphics=ALL-UNNAMED 

--add-opens javafx.controls/com.sun.javafx.charts=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED 

--add-opens javafx.graphics/com.sun.javafx.css=ALL-UNNAMED 

--add-opens javafx.base/com.sun.javafx.runtime=ALL-UNNAMED





Friday, 11 February 2022

ESP32Cam Face Detection crash fix

Reference:

【(不成功来打我)解决esp32cam一人脸检测识别就卡顿终止死机终极必杀!-哔哩哔哩】 https://b23.tv/r16OgXm

https://techtutorialsx.com/2020/06/13/esp32-camera-face-detection/


https://github.com/espressif/arduino-esp32/issues/5128

 app_httpd.cpp


line 286-290, line 389-392 , replace free() to dl_lib_free()


        // free(net_boxes->score);
        // free(net_boxes->box);
        // free(net_boxes->landmark);
        // free(net_boxes);
        dl_lib_free(net_boxes->score);
        dl_lib_free(net_boxes->box);
        dl_lib_free(net_boxes->landmark);
        dl_lib_free(net_boxes);