Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

What is there function like a "delay" in WICED Smart SDK?

I am a Japanese student.

I would like to blink LED to use like a "delay" function.

But I couldn't find it.

Please tell me.

0 Likes
1 Solution
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello hoshiken

There is in fact a delay function(delay in microseconds):

          extern void   bleapputils_delayUs(UINT32 delay);

*delaying more than 2 seconds will cause system reboot

However, this isn't necessary to blink an LED. To blink and LED you can utilize the "timeout" in any of the sample apps. This function is called once per second. With a simple if/then statement, you can utilize this function to toggle the state of the LED pin high and low.

Likewise, you can carry out the same function with the "fine_timeout" function. This function does the same thing as the regular timeout, but it's period can be configured in the configuration array at the top of every function:

const BLE_PROFILE_CFG spi_comm_slave_cfg =

{

    /*.fine_timer_interval            =*/ 20, // ms

}


Jacob

View solution in original post

2 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

This may help: LED with PWM

0 Likes
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello hoshiken

There is in fact a delay function(delay in microseconds):

          extern void   bleapputils_delayUs(UINT32 delay);

*delaying more than 2 seconds will cause system reboot

However, this isn't necessary to blink an LED. To blink and LED you can utilize the "timeout" in any of the sample apps. This function is called once per second. With a simple if/then statement, you can utilize this function to toggle the state of the LED pin high and low.

Likewise, you can carry out the same function with the "fine_timeout" function. This function does the same thing as the regular timeout, but it's period can be configured in the configuration array at the top of every function:

const BLE_PROFILE_CFG spi_comm_slave_cfg =

{

    /*.fine_timer_interval            =*/ 20, // ms

}


Jacob