Simple Code for Storing sensor data to sd card
응답
19. 5. 22 오전 8:24
I am a bigginer in XDK. I am doing a project on capturing vibration data from machines. I am able to modify the code to capture accelerometer z axis vibration data, but I am no able to store it in the sd card. I want to store it in a csv or excel file. I am pasting the code that has to be modified.
 while (1)
    {
        memset(&sensorValue, 0x00, sizeof(sensorValue));
        retcode = Sensor_GetData(&sensorValue);
 
        if (RETCODE_OK == retcode)
        {
            if (SensorSetup.Enable.Accel && !(SensorSetup.Config.Accel.IsRawData))
            {
             count++;
                printf("Accelerometer Converted data :z =%ld mg\r\n",
                        (long int) sensorValue.Accel.Z);

                printf("%d\n",count);
            }
            if (SensorSetup.Enable.Accel && (SensorSetup.Config.Accel.IsRawData))
            {
             count++;
                printf("Accelerometer Raw data :z =%ld\r\n",
                        (long int) sensorValue.Accel.Z);

                printf("%d\n",count);
            }
        }
        if (RETCODE_OK != retcode)
        {
            Retcode_RaiseError(retcode);
        }
        vTaskDelay(pdMS_TO_TICKS(APP_CONTROLLER_TX_DELAY));
    }

I have underlined the section of interest where instead of printing the value of acceleration, I want to store it in the sd card in a siple way. Any one can help me with it?
Thank you.
0 (0 투표)
RE: Simple Code for Storing sensor data to sd card
응답
19. 5. 22 오전 8:53 as a reply to Ankit Chanda.

Hi Ankit

Refer the below post

https://xdk.bosch-connectivity.com/community/-/message_boards/message/182478

thanks

Priyashi

0 (0 투표)
RE: Simple Code for Storing sensor data to sd card
응답
19. 5. 23 오후 12:31 as a reply to Priyashi Yadav.
Thank you for the repply. While downloading the trial version of the data logger, I see that its asking for cost center number of company. I dont understand what to put in there. Can you help me with this?
0 (0 투표)
RE: Simple Code for Storing sensor data to sd card
응답
19. 5. 24 오전 7:49 as a reply to Ankit Chanda.

Hi Ankit

I will check on this and get back to you.

Thanks

Priyashi

0 (0 투표)