I am beginner using Edge Impulse. Its a great platform for embedded Machine Learning development. I have completed the Sound Classification project. I have STM32 IoT discovery board. I have generated binary and deployed on the board. But instead of running from the serial I want to run the impulse periodically with 30 minutes intervals. is it possible by serial command?
Instead of the pre-compiled binary, I recommend using the C++ library or STM32 Cube.AI library. That way, you’ll be able to modify the code to run on intervals or wait for Serial commands. If you’re comfortable with STM32CubeIDE, I put together a demo project using the Sound Classification code. The README of the individual embedded projects in this GitHub repo show you where you can modify the code to put in your own features: https://github.com/ShawnHymel/ei-keyword-spotting/tree/master/embedded-demos/stm32cubeide/nucleo-l476-keyword-spotting
thanks a lot for your response shawn. Yes your suggestion is right it will give me flexibility with my code. I have tried generating STM32Cube.AI library but it keeps giving internal error. I searched the forums and understand its a bug with the STM32Cube.AI which will be solved in the next update. Meanwhile I have read your demo on including C++ library in STM32. I am new to STM32CubeIDE but have installed it and now will try to include C++ library. Hopefully it works or I shall post again here thanks a lot for all your efforts
Glad it helps! I haven’t tried the Cube.AI library from Edge Impulse yet, so good to know they’re working on it.
Hi Shawn, Sorry to bother again, I have compiled your project it is building fine. But I have created a new C++ Library with edge impulse. I am trying to import it in my project. But it keeps giving this error. I have the file available in the path. Can you kindly suggest any solutions. Thanks.
@ShawnHymel @waqas.isa Yeah there’s an issue with some models that’s fixed in Cube.AI 5.2, but upgrading this has been put on the backburner a bit lately. It’s very hard to automatically test the Cube.AI integration as we’d need to drive the STM32Cube.MX tools which does not have a well documented automation API, so it requires real engineering time on our end.
This looks like you’re missing
edge-impulse-sdk in your include path
Thanks for your response. sorry for my ignorance are these all the path I need to set in include path?
@waqas.isa Check in Project > Properties > C/C++ Build > Paths and Symbols > Includes. Make sure your include paths are similar to mine in the screenshot below for C and C++ as well as Debug and Release configurations. Make sure you have model_metadata.h and dsp_blocks.h in the model-parameters folder. Let me know if that works!
thanks a lot shawn. the file missing error is now resolved. I have the same files as yours. There is new error about vector library. I am confused I have selected the C++ project so why is it not getting it automatically.
@waqas.isa I think this has to do with your main file is being compiled as C. Try changing the project to C++ (if you haven’t done so already) and renaming main.c as main.cpp. I did a quick write-up on how to convert a project to C++: https://shawnhymel.com/1941/how-to-use-c-with-stm32cubeide/
Oh yes I missed the .c extension. It should be .cpp. Thanks a lot shawn you have been great help! its now compiled successfully now studying your code to call the classifier in my code. thanks heaps
Awesome! Glad it worked!