Open fullmakeralchemist opened 3 years ago
Did you ever solve this? I have experienced a similar issue. Through some searching I found that if your model is defined as a const
then execution will hang when invoking your TFLite model. If you remove const from your model file it should work. My understanding is that this will move the model from flash to SRAM but I don't know why this is needed given it only happens when using ArduinoBLE with TFLite Micro but it limits the size of model you can use.
Did you ever solve this? I have experienced a similar issue. Through some searching I found that if your model is defined as a
const
then execution will hang when invoking your TFLite model. If you remove const from your model file it should work. My understanding is that this will move the model from flash to SRAM but I don't know why this is needed given it only happens when using ArduinoBLE with TFLite Micro but it limits the size of model you can use.
Hi, I tried multiple times with different codes and I tried about erasing the const from the model.h file right? but still doesn't work. Or what did you mean?
Yeah so I meant in your model.h
you should have unsigned char model[] = {....}
rather than const unsigned char model[] = {...}
Some other things to note:
while (central.connected())
otherwise ArduinoBLE seems to not work. Just check if it's connected, then check for motion. If no, return, else gather enough samples, invoke the model, update the characteristic then returnAs an aside I believe I read somewhere you need to define your BLE services/characteristics like this:
BLEStringCharacteristic * txChar = nullptr;
BLEService * sensorService = nullptr;
then set them in the setup function:
sensorService = new BLEService(UUID_GEN("1000"));
txChar = new BLEStringCharacteristic(UUID_GEN("1001"), BLERead | BLENotify, 512);
Hi, I was following this tutorial of Arduino BLE 33 Sense to use it like a controler of Street Fighter on Raspberry Pi, I tried to use the BLE library to make it wireless with a baterry but I have problems running it like for two weeks, basically it get stuck on running the model I´m not sure if is because of the Bluetooth. Or something else but it don't show me the output from the gestures. It conects but after that it just show me on the serial monitor this:
Connecting ... Connected
on my Python code that receives all the information I tried with a simple int and it works but when I tried to use the model don't give me any result from the gestureid.