Hi ,
I'm use TWI scanner in nRF5 SDK v17.0.2 . I want to read the value of BM1383AGLV via TWI.
Now I could read the value in a infinite loop , but it is so fast . So I want to add the delay function in the loop.
When I add the delay function , it will read value once , then the program will stop.
My code is below. I also try to use timer. but it can't work too.
How should I do ?
Thank you for your kind assistance.
while(1){
//if(timer0_timeout){
//timer0_timeout =0;
rc = BM1383AGLV_getval(&press , &temp);
if(rc == NRF_SUCCESS){
printf("BM1383AGLV (PRESS) = %f [hPa]\r\n" , press);
printf("BM1383AGLV (TEMP) = %f [degrees Celsius]\r\n" , temp);
//}
//app_timer_start(m_single_shot_timer_id, APP_TIMER_TICKS(200), NULL);
}
nrf_delay_ms(200);
}