Edge Impulse & Xiao BLE Sense nRF52840 Motion Recognition Tutorial

I think I may have identified an issue that cost me significant time to get past and am looking for some opinions. I started the Coursera Course on Machine Learning yesterday and the speaker was talking about how when you connect to the board with CLI, it reads firmware and [makes decisions]. I’m like firmware? What firmware? So I started looking at the code posted to test the accelerometer. CLI doesn’t connect without that file being on there. It just tells me it can’t see what it needs.

On the Seeed site part of the code looks like this:

        Serial.print(myIMU.readFloatGyroX() * CONVERT_G_TO_MS2,4);
        Serial.print(myIMU.readFloatGyroY() * CONVERT_G_TO_MS2,4);
        Serial.println(myIMU.readFloatGyroZ() * CONVERT_G_TO_MS2,4);

I changed all the readFloatGyro to readFloatAccel, assuming the former was for the gyroscope. The signals sampled looked much different and actually separated nicely and worked well. Didn’t have that luck with the gyro bit, so I deduced that Edge Impulse is actually looking at those read statements and sampling from them? Is that correct?

I’m sorry if that is a dumb question. I’m very new to using this tool and I am just trying to understand what I am looking at. I know changing that little part made the project work (mostly). I just want to be sure I know why.

Hi @Aezarien,

For the “what firmware?” question, if you take a look at the directions to use the Edge Impulse CLI with the Arduino Nano 33 BLE here (Arduino Nano 33 BLE Sense - Edge Impulse Documentation), you should see a part where it instructs you to load a pre-built firmware to the Nano 33 BLE.

The CLI does not work with the Xiao BLE Sense, as the sensors are different on that board, and so the firmware would need to be changed. The Xiao BLE Sense is not an officially supported Edge Impulse board.

How are you sending data samples to the Edge Impulse Studio? Are you using the CLI? If you are using something like the Uploader (Uploader - Edge Impulse Documentation), then the uploader tool looks for comma-separated values coming across the serial line to send to your project on Studio (i.e. on the Internet).

Hope that helps!

1 Like

I ordered a Nano 33 BLE for the Coursera course and I wanted a supported board. I just received it, so I have not done any of the course projects, yet but it’s on the schedule for this week! I initially found Edge Impulse through one of Seeed Studio’s tutorials (Will post link below). Struggling with understanding what was going on in the tutorial is what inspired me to get on Coursera to see if they had any courses on machine learning.

I downloaded NodeJS and Python and connected the Xiao through CLI using edge-impulse-data-forwarder. I apologize. I cannot remember where I obtained those instructions. There was no firmware, just the snippet of code meant to test the accelerometer, but actually is for the gyroscope. I’m not sure how well I am explaining it, but without that test code, CLI won’t even connect to the Xiao. Then when I changed the code for the Arduino IDE to read the data from the accelerometer, the samples appeared different. The X,Y, and Z waves looked as they should for the given movement and I actually ended up with a serviceable model. Makes sense, but doesn’t. hah. At least to me. I don’t really expect an explanation for that, but wouldn’t turn down one, either.

But yes, I am now clear about what firmware means, in the context of microcontrollers and Edge Impulse. I imagine other things will become more clear, now that I have a supported board.

Thank you for your insight!

1 Like