How to adjust the sensor sample frequency?

Can you give me more detailed information about edge-impulse-data-forwarder?
For example, the code implementation.

Hi @davwang,

You can have more details in our documentation:https://docs.edgeimpulse.com/docs/cli-data-forwarder

The source code is also available on GitHub: https://github.com/edgeimpulse/edge-impulse-cli/blob/master/cli/data-forwarder.ts

Aurelien

When I used the edge-impulse-data-forwarder tool, I found that there is one requirement about this tool.

Because I upsent the serial data every 6 seconds, there is some interval in the data sequence I can not handle very well.

Is there some method ? Which can be used for complete data sequence?

@aurel I have some issues. Can you help me?

Hi @davwang,

You can force the frequency of the data forwarder if it cannot be detected correctly, ie: edge-impulse-data-forwarder --frequency 1 (1 Hz frequency).

Aurelien

I mean that if the serial data have some interval between two sequences, are there any methods for handling? For example, if the tools send a command to the device I developed, then the serial data will be upsent to this tool.

It would be best to capture different samples if you have a break in your sequence.
What you can also try is the Crop/Split function in the Studio:

Aurelien

I know your method “crop and split”, but I think it is not the optimal method for this condition.
Maybe there are some other methods for this.

@davwang Three options:

  1. Use a higher priority thread (if that’s available) to make sure you always keep printing. Not sure on the target, but typically you can set a hardware ticker that fires an interrupt which always has priority, and write then.
  2. An alternative way is not using the data forwarder but just writing CSV files over serial (e.g. https://docs.edgeimpulse.com/reference?_ga=2.177157157.1890775457.1631454239-1252652237.1574934249#importing-csv-data) then you’re in full control over the data. Not sure if this fixes your artefacts.
  3. Don’t send the data every 6 seconds while you’re capturing data with the data forwarder :slight_smile:

Thanks for your help. I have found that the platform has been updated for these equal samples.

Hi, I am new, and encounter this problem which sampling will not start after collecting about 3minutes of data

Thanks for your help

@npiot What is the exact issue you’re having and what target are you using?

1 Like

Thanks for your reply. I was trying out the nano ble 33 audio tutorial, capturing multiple voice samples and sampling somehow stopped after successfully collecting several samples. I closed the terminal, reconnect to Edge, and it works again. I guess I am ok now.
Thanks again for following up

1 Like