Using External Sensors with Syntiant TinyML

Hi, I recently posted this same inquiry to Edge Impulse(linked here), but wanted to post here as well to get more ideas.

I was wondering if anyone has experience using the Syntiant TinyML with external sensor data. I’m currently looking at the firmware libraries for the board here and I found a function in syntiant_ndp10x_micro.c (which is linked here)called syntiant_ndp10x_micro_send_data. I noticed that this function wasn’t implemented in the NDP.cpp wrapper file and I am trying to use it to send external sensor data to the NDP101.

For right now, I am simply trying to write fake data (an array of integers) to the NDP101 and then read it again using the extractData function from NDP.cpp. I’m not getting my expected results and my suspicion is that extractData is not reading from the same memory address that I write the data to. Alternatively, the data might be overwritten by the time I try to read it, but I’m not sure how to check that. Here is how I am currently trying to use the send_data function in NDP.cpp:

int NDPClass::sendData(uint8_t *data, unsigned int len) 
{
    return syntiant_ndp10x_micro_send_data
        (&ndp, data, len, SYNTIANT_NDP10X_MICRO_SEND_DATA_TYPE_FEATURE_STATIC, 0x00);
}

As of right now, I’ve made no other modifications to any of the other files.

I was considering using SYNTIANT_NDP10X_MICRO_SEND_DATA_TYPE_STREAMING for the type variable instead, but I wasn’t certain on how to access the SPI interface of the NDP and properly read and write from it.

Any help or advice would be appreciated. Thank you!