Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionalities for in-the-wild data collection #95

Open
wants to merge 71 commits into
base: main
Choose a base branch
from

Conversation

ThiasTux
Copy link

List of functionalities added:

  • Recording of IMU data on SD card on dedicated file in dedicated folder
  • Recording of Pressure/Temp data on SD card on dedicated file in dedicated folder
  • Adjusted the headers of the files
  • Reworked timing of main loop when recording/streaming data to support higher frequency for IMU (up to 100 Hz when the correct command is sent from the dashboard) and additional recording on SDCard
  • Added RGB Led status when recording (R=microphone, G=Pressure/Temp, B=Imu)
  • Fixed order of gain settings for left/right mic to reflect inner/outer gains in dashboard

mciliberto-wearableml and others added 30 commits May 28, 2024 14:14
@CLAassistant
Copy link

CLAassistant commented Oct 28, 2024

CLA assistant check
All committers have signed the CLA.

@amadeusuzx
Copy link

Hi @ThiasTux , thank you for sharing those useful functionalities. I have been trying to flash the code on your branch but can't get the board to work as expected. I got

PDM FAIL!
Player FAIL!

on device startup, and when I connect it to the dashboard and set the configuration, I got

Initialising baro file
Log filename:
/Baro/Baro_1_37896.csv
Error opening the BARO file
Initialising imu file
Log filename:
/Imu/Imu_1_37284.csv
Error opening the IMU file

(Please see the full debug output at the end of this post.)

I did some tests and it looks like _available = sd->begin(SPI_CC, SPI_SPEED); was giving 0 and caused the write fail. However, I am using a Sandisk Extreme SD card and it should be fast enough.
I have followed the installation instructions by running the install.sh file. Could you please share your advice on this problem? Thank you in advance!

Full debug output:

IMULogger debug set correctly!
BAROLogger debug set correctly!
Recorder debug set correctly!
PDM FAIL!
Player FAIL!
Begin Init
Begin
BLEHandler_G Begin: 
address = 1B:DF:5B:2A:0A:6B
name = OpenEarable-0A6B
SensorProvider Begin

End Begin
============
Configuration: 
data: 0
50.00
0
Initialising imu file
Log filename:
/Imu/Imu_1_37284.csv
Error opening the IMU file
Current_status: 
0
0
255
Configuration: 
data: 1
30.00
0
Initialising baro file
Log filename:
/Baro/Baro_1_37896.csv
Error opening the BARO file
Current_status: 
0
255
255
Configuration: 
data: 2
16000.00
65535
Current_status: 
255
255
255
Configuration: 
data: 0
0.00
0
Current_status: 
255
255
0
Configuration: 
data: 1
0.00
0
Current_status: 
255
0
0
Configuration: 
data: 2
0.00
0
Current_status: 
0
0
0

@ThiasTux
Copy link
Author

Hi @amadeusuzx, thank you for your feedback!! While I check the firmware for bugs (I have already a couple in my mind), could I just ask you to try to use the PlatformIO wrapper to flash the firmware??
The install.sh script is a bit obsolete and tends to create multiple possible point of failure. The PlatformIO project is available at https://github.com/cam-mobsys/Mobysis_OpenEarable_PlatformIO
Also, about the SD card, please make sure it is formatted as ExFat as it should work despite the errors on PDM and Player that you see at boot

@amadeusuzx
Copy link

Hi @ThiasTux, thank you so much for sharing the platformIO project, and with it the recorder is working now! I will use platformIO for further development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants