There are two ways one can develop firmware
-
Using starting repo from the Edge Impulse
GitHub - edgeimpulse/firmware-syntiant-tinyml: Edge Impulse firmware for Syntiant TinyML boardThe above code is comprehensives but it is complex. Arduino IDE cannot be used with the method. Follow README in the repo for compiling.
-
Alternatively, simpler sketches can be used as the starting point with less complexity. However, these sketches does not have full functionality, eg. transferring the model from the computer to the serial flash of the TinyML board. It is assumed that the model is already transferred using Edge Impulse’s download methodology. The purpose of these sketches is to guide users how to build the firmware from the scratch.
Some of the examples are available in the forum
A. Low power operation
TinyML Low Power operation
B. Simple inferencing operation
Simple inference only sketch for TinyML Board - #2 by AviAIML
C. Saving sensor and Microphone data into micro SD card
Saving Data into uSD card from Microphone or Sensor
D. Turning on and off 5V supply on pin number 2
Programmable 5V supply at pin # 2
Over time more sketches will be developed by forum members and shared.
By default, Arduino keeps library (in windows) at C:Users/USER NAME/Documents/Arduino
It is likely the user may have a set of libraries which are working well for their other projects. If the default Arduino library is updated then it is likely that other projects do not compile. Thus it is recommended to download the directory for TinyML in a separate location and then point it in the File → Preferences menu of Arduino IDE. Browse the directory under “Sketechbook location:” window.
One of the library which works for most of the above projects can be found at
GitHub - AviAIML/Arduino_TinyML_libraries: These libraries are evolved from R. D. Poor's library.
Some of the projects may include the library in their repo. You can use the accompanying library if the above library does not work.
Download the directory from the github by selecting “Download Zip” under Code. Unzip the downloaded zip file. It should have following structure
…\Downloads\Arduino_TinyML_libraries-main\Arduino_TinyML_libraries-main\Arduino-TinyML_libraries\libraries
You could copy Arduino_TinyML_libraries-main directory in your Documents directory such that the path looks like this
\Documents\Arduino_TinyML_libraries-main\Arduino-TinyML_libraries\libraries
When browsing “Sketechbook location:” window, DO NOT navigate to libraries. The path should look like this (without libraries)
\Documents\Arduino_TinyML_libraries-main\Arduino-TinyML_libraries
Click on “ok”.
The sketches does not need to be saved in the same path.