Tensorflow lite micro on Arduino Nano 33 BLE Sense: Part 2 the software

3 min readJun 7, 2021

To use this I decide to use Platform IO, via Visual Studio Code. I happen to use Windows 10 during the project, I tend to write as how I will use it on on windows, except building Tflite micro, that is done on my linux home server(just the first thing on my mind before I realized I haveWSL2).

Brief intro of Platform IO, this is a development environment to build embedded software. This tool have a set of advantage over Arduino IDE

  • It can be used to build software without Arduino framework, for example ESP32 c++ library
  • This can be used on command line, so it can be integrated with CI tools.
  • Tool can be used to setup environment to build a project. A thing that is cumbersome on arduino IDE
  • This produces a platformio.ini file. This is a configuration file that contains the dependency, monitor port speed and other configuration. This make sharing project very easy.
  • It also have specific directory to put local library. So you can easily add it to version control.
  • It make it easy to share project to version control. In command line, you know the path to project. On VS Code, you can use VCS integration.

In short we will use Platformio. I will not share how to setup because the documentation works for me. If you’re not a fan of vscode, the command line way to install is here, it’s how i install it on ubuntu.

First to setup a project here’s what I do. Now that you have installed PlatformIO on VS Code, choose PlatformIO at the left. You should see create project. The board to choose is Arduino Nano 33 BLE, it is the same as Arduino Nano 33 BLE sense, but no sensor. You should ends up with something like this the photo.

Project setup

For my project I am using the IMU unit. To setup find the library Arduino_LSM9DS1, on the libraries section on PlatformIO plugin. Or if you prefer command line can go to https://platformio.org/lib/show/6589/Arduino_LSM9DS1.




Codemonkey coding for tea. Startup developer at day, community organizer at night. I also happens to be on patreon https://www.patreon.com/sweemeng