StreamSensorDataOverUSB
응답
16. 9. 21 오후 10:48

Hi all. I'm trying to follow the example to stream the sensor over usb as listed in the OverviewExamples XDK110. Doing it right out of the box, it streams the data into the consol.

It also says I should be able to look at the data in the XDK Monitor Plug in by changing the following to the LightSensor.c.

printf("{[MONITOR]%s(%lu):Light=%d%s}", "Sensor", OS_timeGetSystemTime(), SensorData, "Units"); 

So I continue on since that really doesn't make any sense to a non programmer like me and I see the example and I'll add it to as an image. It's slightly different but I change it.

Now I get a compile error with an undefined reference to 'OS_timeGetsystemTime()' and a trangle with too many arguments for format [-Wformat-extra-args]

I'm typing it exactly as it's listed in the image below, what is the error that's preventing me from compiling the code? I'm taking it one step at a time because I'd like to then save the data as a .csv at the monitor app shows.

thanks - Mark

+1 (1 투표)
RE: StreamSensorDataOverUSB
응답
16. 9. 22 오전 9:23 as a reply to MARK FONTANELLA.

Hello Mark,

we are really sorry for this inconvenience. The example overview isn’t updated to the latest version 1.6.0 of the workbench in this part. We will upload a new version as soon as possible.

The following code snipped should work instead of the previous.

printf(
    "{[MONITOR]%s(%ld):l=%ud%s} \n\r",
    "MAX44009",
    xTaskGetTickCount(),
    (unsigned int) milliLuxData,
    "milliLux"
    );

Due to the latest workbench version 1.6.0 OS_timeGetSystemTimeMs() is deprecated now, xTaskGetTickCount() is the new function to acquire the system time.

Please keep in mind, that the string format parameters like ld or ud have to match the of the streamed sensordata.

Kind regards,
Manuel

0 (0 투표)