. . . #define USE_BOTTOM_SENSOR . . . int main(void) { /* USER CODE BEGIN 1 */ . . . /* USER CODE BEGIN 3 */ /* SysTick end of count event each 1ms */ SysTick_Config(HAL_RCC_GetHCLKFreq() / 1000); #ifdef USE_BOTTOM_SENSOR /* **** below is new example code, activating Bottom sensor **** */ /* put all devices under reset */ for (int i = 0; i <= XNUCLEO6180XA1_ID_RIGHT; i++) { /* put all sensors under reset */ XNUCLEO6180XA1_ResetId(0, i); } WaitMilliSec(10); /* activate bottom sensor only, keep the rest inactive */ XNUCLEO6180XA1_ResetId(1, XNUCLEO6180XA1_ID_BOT); WaitMilliSec(1); #else /* **** below is original example code**** */ /* reset_test(); */ XNUCLEO6180XA1_Reset(0); WaitMilliSec(10); XNUCLEO6180XA1_Reset(1); WaitMilliSec(1); #endif . . . }