Thanks, can I crwate a separate task for this, in main function in for loop, can I use tk_sleep for Half second, that way, task collects data for every Half second.
task_main_fn()
{
for(;
{
collect GPIO data and do process....
tk_sleep(half-second);
}
}