Raspberry Pi Custom accelerometer sensor "Invalid"


I’ve followed all the steps for connecting to my Raspberry Pi’s accelerometer sensors, and can push data from the collect.py file, but the classify.py file does nothing, and if I run edge-impulse-linux-runner in my terminal, I get an error that says “Invalid sensorType: accelerometer”. Any idea why this is?

Project ID:


Context/Use case:

Using my gesture recognition model to classify gestures from the Raspberry Pi using the accelerometer.

Hi @Hohenssi,

Where did you find the collect.py and classify.py files? If you found them in a repository, please post a link to that repository. If you wrote them yourself, please paste your code.

If you are using this classify.py, please note that you need to paste features from a sample in your Edge Impulse project into a .txt file and pass that .txt file path as a parameter to the call. For example:

python classify.py <path_to_model.eim> <path_to_features.txt>

You cannot use the runner standalone with a custom sensor, as the runner does not know how to talk to the sensor. Your best bet is to use it to download the .eim file and then perform inference using something like Python. Please see this guide for more information.

1 Like


My issue more-so is the lack of support for the accelerometer in general. Even from the data acquisition page, I can connect my Pi and get an error that the sensor type is not supported. Please see attached image. I’ve made sure my SenseHat is calibrated and recognized by my Pi. I can get outputs from the SenseHat locally but not in EI.

Hi @Hohenssi,

We do not have the ability to read from the accelerometer (or other sensors) attached to the Pi directly from your project in Studio using the method in your screenshot. The collect.py script should automatically collect the sample and upload the sample directly to your project.

When you run collect.py, watch the output on your terminal, look for the Uploaded file to Edge Impulse message. If you see that, go to the Data acquisition tab in your project, and you should see your samples appear there.

Hi @shawn_edgeimpulse ,

Thank you, yesterday I figured this might be the case so I tinkered with that script a little bit to sample the data for about 4 seconds and upload directly to the project. This is disappointing, as we hoped to be able to do “automatic” ingests in the future, so if any update is made to support that I would love to hear about it. Thanks!

1 Like