Acoustic sensor + other sensors
Answer
27/04/19 20:19

Hello!

I've managed to create a simple application to read sensor data from the humidity, temperature and pressure sensors.

Then, on a different project, I followed this tutorial to implement and use the acoustic sensor:

https://developer.bosch.com/web/xdk/acoustic?fbclid=IwAR29YW_-PgYwPMos9daq_tTnI6xAppzJQUD99EQYaTKDQAr2xOzDruCrO6o

This worked fine. However, I've since tried to combine it with my first project and for some reason the program gets stuck when I try to enable the other sensors (after enabling the acoustic sensor).

I found this thread (https://xdk.bosch-connectivity.com/community/-/message_boards/message/479867) stating that reading data from the acoustic + other sensors is currently not possible. Is this still the case or I am doing something wrong? Here is the relevant code:

static void AppControllerSetup(void * param1, uint32_t param2){

	if (RETCODE_OK == NoiseSensor_Setup(22050U)) {
        uint32_t oneSecondDelay = UINT32_C(1000);
        uint32_t timerAutoReloadOn = UINT32_C(1);

        acousticHandle = xTimerCreate((const char *) "readAcousticSensor", oneSecondDelay, timerAutoReloadOn, NULL, readAcousticSensor);
    }
	if (RETCODE_OK == retcode)
	{
		SensorSetup.CmdProcessorHandle = AppCmdProcessor;
		retcode = Sensor_Setup(&SensorSetup);
	}

if (RETCODE_OK == retcode)
	{
		retcode = CmdProcessor_Enqueue(AppCmdProcessor, AppControllerEnable, NULL, UINT32_C(0));
	}


}

static void AppControllerEnable(void * param1, uint32_t param2){


    if ( RETCODE_OK == NoiseSensor_Enable()) {
        xTimerStart(acousticHandle,timerBlockTime);
    }
	if (RETCODE_OK == retcode)
	{
       
		retcode = Sensor_Enable(); //The program stops here if we also enable the noise sensor
	}


}

 

 

 

0 (0 Votes)
RE: Acoustic sensor + other sensors
Answer
29/04/19 06:48 as a reply to José Mendes.

Hi José Mendes,

Reading data from acoustic sensor + other sensors is not supported in XDK workbench v3.6.0 and v3.5.0.

Thank you.

0 (0 Votes)
RE: Acoustic sensor + other sensors
Answer
30/04/19 09:53 as a reply to Padmapriya G.

Here my friend - done with WB1.7 - all sensors, accoustic and external, and all buttons...

#LikeABosch

+1 (1 Vote)