Real time data processing

Hi all,
I have been using CCS811 and Arduino nano 33 ble sense in my edge impulse using data forwarder to train my module. It looks as if I have trained the module correctly. When I want to deploy it on an Arduino board, I cannot process data on real time. How do I pass the real time data from sensor to static const float features[] for continuous classification.

Hello @sunim,

If you managed to use the data-forwarder to collect your data, you now need to change few things in your code. Please see: it will give you an example on how to do that.

But basically, what you need to do is to fill a buffer with the raw data at your defined frequency (or by setting the right time interval), convert that into a signal from the buffer using:

numpy::signal_from_buffer(features, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE, &signal);

And then pass the signal into the run_classifier function:

run_classifier(&signal, &result, false);




Thanks for your response @louis,
Does this mean we need to modify all the code as per the link provided? or do we just add the code that you provided?
Thanks in advance

@sunim The example sketch on the page Louis mentioned should have everything (just hook in your own sensor code). Additionally the Arduino library export has an example for continuous motion classification, which has some example code too.

1 Like