 Hey everyone! My name is Guillaume, application engineer with STMicroelectronics. Today, I'm going to show you how to get started with the new STM32Q function pack called FPAI Sensing 1. This function pack features example of artificial intelligence application based on audio and motion sensing. Beyond being a simple AI example, the FPAI Sensing 1 features a complete firmware to develop an IoT node with BLE connectivity, a digital microphone, environmental and motion sensors. The pack includes four AI algorithms, three different algorithms for human activity recognition, or HAR. Using motion sensors, the HAR algorithms will tell you if you're standing, walking, running and so on. The pack also includes one acoustic scene classification example called ASC to tell you if you're indoor, outdoor or in a vehicle based on ambient noise captured by the microphone. The neural networks provided with this function pack have been trained on a limited dataset and are given, for example, purposes. It is up to you to provide your own dataset and create new models. The goal is to provide an end-to-end implementation example from sensory acquisition to sending classification results to a smartphone application, on which you should put your own advanced neural network. All AI libraries included in this pack were generated using CubeMX and the XCube AI extension from pre-trained Keras and Lezyne models. This function pack has been designed specifically for ultra-low-power applications, the use of an RTOS and an ultra-low-power microcontroller, the STM32L4. It is compatible with the STBLE sensor smartphone app, available for both Android and iOS. The app allows for sensor reading, audio and motion classification monitoring to perform firmware update over the year, FOTA, and also a data logging and annotation feature for the creation of new AI datasets. To run this example, you'll either need a sensor tile development kit with a spare nuclear board to program the tile, or you can also use a Nucleol L476 board with three different expansion shields, so a USB and MEMS microphone expansion shield, a Bluetooth expansion shield, and an environmental and motion sensing expansion shield. You'll also need an Android or iOS smartphone and a USB cable. Today, I will be using a sensor tile. To connect the board, you need to connect an external ST-link to the SWD connector to the tile. You can use the 5-pin flat cable that was included with the sensor tile kit package. Make sure to remove the two CN2 jumpers to connect your STM32 nuclear board to the sensor tile through the provided cable paying attention to the polarity of the connectors. Pin 1 can be identified by a little circle on the PCB shield screen or by the square shape of the soldering pad on the connector. Then you'll take your USB cable, plug in the USB mini side to the nuclear board, and the other side to your computer. When the nuclear is correctly connected, you should see a steady red LED. So let's go and program the sensor tile. So open up STM32 Cube Programmer. You want to make sure that your device is recognized. And then port SWD. Make sure to have mode under reset. Reset mode to hardware reset. Click connect. Then you want to open the binary file. So if you downloaded the package, it should be in the download folder. And browse to project, multi-application, sensing one, binary, and sensor tile. Here you have different kinds of binary. You have binaries with underscore BL. Those are the binaries that include both the user application and the bootloader. The ones without BL only include the user application and they will be used for the firmware upgrade over the year. So we have a four different configuration, three HR human activity recognition algorithms, and one acoustic scene classification example. So we'll start with the ASC binary. Sensing one ASC underscore BL dot bin. Click open. And then you can click download. When the program is downloaded, you can power cycle the sensor tile to reset and run the user application. So you can disconnect the tile from the programmer. Power cycle the board, so turn it off and back on. This will reset the board and run the application. So after a few seconds, you can see the LED blinking. Next you want to open up STBLE sensor app. So you need version 4.1 or later. And when your device is blinking, you can click connect to device. Your device should show up under the name TAI if you use a sensor tile or NAI for a nucleo. You can click on it to connect. And if you program the ASC binary like I did in the menu, you should see audio classification. And it should recognize whether you are indoor, outdoor, or in a vehicle. Okay, so now that I'm outdoor, as you can see, the algorithm is recognizing outdoor ambient noise. And when you're holding the sensor tile, you want to make sure that the microphones are staying upright so that you can hear the sound properly. And now we're going to check out vehicle noise. Okay, so now I've got the window open and we are outdoors. I'm going to turn on the engine and we should be in vehicle. To run a firmware upgrade, we're first going to load the binaries onto the phone so that the phone can then send the binary to the sensor tile. So to load the binary onto the phone, you want to connect the USB cable to the phone. And then when the cable shows up, click on USB for charging. Switch to file transfer. And then you should see a phone that shows up under my computer. So you want to copy the binaries that we used previously, but the ones that do not have underscore BL. So we want to use ASC, IGN, and GMP.bin. I'm using a Nexus 5. Go to internal storage and you can copy them anywhere you want. Next, you can disconnect your phone. And that's your ready to go. So once the firmware has been fully downloaded, you want to go back to the main menu. Click on connect to device. Wait until your device is blinking. And then when you're on a phone that is running Android 8 or below, you want to make sure to clear device cache. Then you can click on the device. This is to make sure that the new characteristic is recognized by the app. Then in the menu, you should be able to see activity recognition. And you won't see acoustic scene classification anymore. So click on activity recognition. And now you're on the activity recognition menu. And you can play with the tile. Now if I grab the tile and if I start walking, it shows that I'm walking. And if I start running, I'm running.