Hello Everyone,
I have been a part of the community for several years now but would like some advice/guidance with a project. My senior design project is to develop a lander for a theoretical NASA mission to the Psyche Asteroid. (Read more here if you're interested: https://psyche.asu.edu/ )
My team has a concept we would like to test and I am trying to get ahead of the coming work. This may turn out to be a bit lengthy so I apologize.
1A: Is Nicla Sense ME set up to obtain data from the accelerometer and gyroscope sensors and display it through the serial port in 3D space? I have been reading through the Arduino Nicla Sense ME Cheat Sheet and it appears it's going to give the data as XYZ locations for the gyro and XYZ accels for acceleration. I know that Paul McWhorter does an entire series on a Nano/BNO055 and sends the data to python to show it in real-time, (see: 9-Axis IMU LESSON 1: Introduction to Nine Axis Sensors and Inertial Measurement Units with Arduino - YouTube ), but I was wondering if Arduino IDE had something similar.
1B: If the data can not be represented through the serial port in 3D space, does anyone know of a way to save the data to a file and a general idea on how to make it into a visualization? I am not opposed to doing it through python, but I do have access to Matlab and find that the 3D plotting looks a bit more professional.
2: The Nicla Sense ME says it has a 64 MHz Cortex M4 microprocessor, and the cheat sheet indicates that the sample rate and latency can be dictated through the "configure()" command. Does anyone have the slightest idea of the highest sample rate I may be able to obtain with this board? I apologize if this is straightforward, not only am I not that smart but I am also getting an ME degree.
CODE GIVEN:
#include "Arduino_BHY2.h"
SensorXYZ accelerometer(SENSOR_ID_ACC);
SensorXYZ gyro(SENSOR_ID_GYRO);
void setup(){
Serial.begin(115200);
BHY2.begin();
configure(10,1); // **THIS IS WHERE THE SAMPLE RATE (10Hz) AND LATENCY (1ms) ARE **
accelerometer.begin();
gyro.begin();
}
void loop(){
unsigned long lastCheck= millis();
// Update function should be continuously polled
BHY2.update();
// Check sensor values every second
if (millis() - lastCheck >= 1000) {
lastCheck = millis();
Serial.println(String("acceleration: ") + accelerometer.toString());
Serial.println(String("gyroscope: ") + gyro.toString());
}
}
short accX = accelerometer.x();
short accY = accelerometer.y();
short accZ = accelerometer.z();
short gyroX = gyroscope.x();
short gyroY = gyroscope.y();
short gyroZ = gyroscope.z();
3: We are planning to drop our lander from 3 meters and would like to measure the acceleration to trigger another event. This event will need to be as precise as possible but due to the high current will be run through a relay as the switch. In any of your opinions is this sounding remotely possible and should I scrap the Arduino Nicla Sense ME with the built-in accelerometer and gyro for something else? If so what?
Thank you for your time and I hope you all are having a great time hacking!