Orientation Sensor with live monitoring
응답
17. 1. 19 오후 4:56

Hello,

first i would love to thank everyone who is helping me and the others in order to improve with XDK.

 

I was doing the Orientation Sensor Program with live monitoring. After flashing my application, i tried to monitor the data, but i didn't receive the data on the graph from the manual.

 

here is the code:

 

/**
 * This software is copyrighted by Bosch Connected Devices and Solutions GmbH, 2016.
 * The use of this software is subject to the XDK SDK EULA
 */

/* module includes ********************************************************** */

/* system header files */
#include "BCDS_Basics.h"
#include "XdkSensorHandle.h"
 //  uint32_t INITDELAY = 100;
  // uint32_t LOOPDELAY = 100;


/* additional interface header files */
#include "FreeRTOS.h"
#include "timers.h"
#include"BCDS_Orientation.h"


/* own header files */
#include "XdkApplicationTemplate.h"

/* constant definitions ***************************************************** */

/* local variables ********************************************************** */

/* global variables ********************************************************* */

/* inline functions ********************************************************* */

/* local functions ********************************************************** */

/* global functions ********************************************************* */

/**
 * @brief This is a template function where the user can write his custom application.
 *
 */


static void initOrientationSensor(void)
{
/* initialize Orientation sensor */
Retcode_T returnValue = RETCODE_FAILURE;

returnValue = Orientation_init(xdkOrientationSensor_Handle);

if ( RETCODE_OK != returnValue)
{
printf("Orientation Sensor initialization Failed\n\r");
}
}


// Reading
static void readOrientationSensor(xTimerHandle xTimer)
{
    (void) xTimer;

    Orientation_QuaternionData_T QuaternionValues;
    Retcode_T returnQuatValue = Orientation_readQuaternionValue(&QuaternionValues);
    
    printf("QUATERNION: w=%f x=%f y=%f z=%f\n\r", QuaternionValues.w,QuaternionValues.x,QuaternionValues.y, QuaternionValues.z);
    
   
}

 

// Timer Task

void appInitSystem(xTimerHandle xTimer)
{
    (void) (xTimer);
    
    uint32_t timerBlockTime = UINT32_MAX;
    uint32_t oneSecondDelay = UINT32_C(1000);
    uint32_t timerAutoReloadOn = pdTRUE;  
    
    xTimerHandle OrientationSensorHandle = NULL;
    
    initOrientationSensor();
    
    OrientationSensorHandle= xTimerCreate((const char *) "readOrientationSensor",oneSecondDelay,timerAutoReloadOn, NULL, readOrientationSensor);
    
    xTimerStart(OrientationSensorHandle,timerBlockTime);
}

/** ************************************************************************* */

 

0 (0 투표)
RE: Orientation Sensor with live monitoring
응답
17. 1. 20 오후 12:29 as a reply to Ismael Ismael.

Hello Ismael,

I guess your issue is related to a wrong configuration of the XDK Monitor view.

You can solve this issue by right clicking on the settings symbol in the XDK Monitor view. A view with the monitor configuration should pop up where you can select "orientation sensor" in both drop boxes. Click okay and start the XDK Monitor. Now you should be able to receive the displayed measurements of the orientation sensor.

Please do not hesitate to ask if you have further questions.

Kind regards,
Franjo

0 (0 투표)
RE: Orientation Sensor with live monitoring
응답
17. 1. 20 오후 1:16 as a reply to Franjo Stjepandic.

Dear Franjo,

 

I did what you said exactly, as the following picture, but i still can't receive any data on console or graph !

 

0 (0 투표)
RE: Orientation Sensor with live monitoring
응답
17. 1. 23 오전 9:39 as a reply to Ismael Ismael.

Hello Ismael,

I tested the code in order to display data in the XDK Monitor view. I received data in the console with the started and also stopped XDK Monitor view. The current state of the XDK Monitor view is completely independent of the console. The XDK Monitor only imports the data printed in the console.
Did you flash the code to the XDK before you started the XDK Monitor view? Because if you do not get any console output, this issue is not related to the XDK Monitor view.
Further do other examples like the LedsAndButtons example are running corretly on your XDK ?

Kind regards,
Franjo

0 (0 투표)
RE: Orientation Sensor with live monitoring
응답
17. 1. 23 오전 10:27 as a reply to Franjo Stjepandic.

Dear Franjo,

am answering your questions.

Keep in mind that the problem is solved.


-Did you flash the code to the XDK before you started the XDK Monitor view?

Yes, I did flash the code to the XDK couple of times. (i guess the problem was in the flashing, i needed to stop the XDK interface program couple of times and change the port then i selected the project and flashed it again and it works).

 

-Further do other examples like the LedsAndButtons example are running corretly on your XDK ?

yes it works correctly.

 

Thank you.

 

0 (0 투표)
RE: Orientation Sensor with live monitoring
응답
17. 1. 23 오전 11:38 as a reply to Ismael Ismael.

Hello Ismael,

I am glad to hear that the issue is solved.

Please do not hesitate to ask if you have further questions.

Kind regards,
Franjo

0 (0 투표)