Hello, I have made a model that allows detecting falls using the accelerometer values as data and uses the Syntiant processing block. The model was made in edge impulse.
I made a sketch in Arduino Ide to be able to obtain the result of the inference. The code shows through the serial monitor the label that was inferred
#include "NDP.h"
#include "Nicla_System.h"
const bool lowestPower = false;
void ledBlueOn(char* label) {
if (!lowestPower) {
Serial.println("Label received");
nicla::leds.begin();
nicla::leds.setColor(blue);
delay(200);
nicla::leds.setColor(off);
Serial.println(label);
nicla::leds.end();
}
}
void setup() {
Serial.begin(115200);
nicla::begin();
nicla::disableLDO();
nicla::leds.begin();
NDP.onError([]() {});
NDP.onMatch(ledBlueOn);
NDP.onEvent([]() {});
Serial.println("Loading synpackages");
Serial.println("This is a custom flash for sacha model");
NDP.begin("mcu_fw_120_v91.synpkg");
NDP.load("dsp_firmware_v91.synpkg");
NDP.load("ei_model.synpkg");
Serial.println("Packages loaded");
NDP.getInfo();
Serial.println("Configure mic");
NDP.turnOnMicrophone();
NDP.interrupts();
nicla::leds.end();
if (lowestPower) {
NRF_UART0->ENABLE = 0;
}
}
void loop() {
}
But no results appear on the serial monitor.
Packages loaded
dsp firmware version: 19.2.0
package version: Model generated by Edge Impulse
pbi version: 3.2.3-0
num of labels: 2
labels: NN0:ADL, NN0:FALL
total deployed neural networks: 1
Configure mic
I made another model to see if it was the board that was not working correctly, this model detected a predefined word through the microphone. In this model it did show me the inference on the serial monitor
Packages loaded
dsp firmware version: 19.2.0
package version: Model generated by Edge Impulse
pbi version: 3.2.3-0
num of labels: 4
labels: NN0:no_sacha, NN0:noise, NN0:si_sacha, NN0:unknown
total deployed neural networks: 1
Configure mic
Label received
NN0:unknown
Label received
NN0:noise
Label received
NN0:noise
I would like some help on how I can make the model used by the IMU sensor show the inference through the serial monitor, as I later want to send that value via Bluetooth to an App. Thank you.