Does an IR sensor (tsop1738) or something that creates a series of bits exist
Quote from arcachofo on January 8, 2024, 6:24 pmThat kind of things should be implemented in the script.
You know how long each sequence takes.
So you can setup an event for the duration of the sequence or any time you want.If you want to do something after 100 ms you can do this:
After you trigger a sequence add an event to run after 100*1e9 ps:component.cancelEvents(); // You can cancel previous events if needed component.addEvent( 100*1e9 ); // 100 ms
Then you need to add a runEvent() function.
This function will be called 100 ms later:void runEvent() { // Do something if( some_condition ) component.addEvent( time_in_ps ); // You can add more events }
That kind of things should be implemented in the script.
You know how long each sequence takes.
So you can setup an event for the duration of the sequence or any time you want.
If you want to do something after 100 ms you can do this:
After you trigger a sequence add an event to run after 100*1e9 ps:
component.cancelEvents(); // You can cancel previous events if needed
component.addEvent( 100*1e9 ); // 100 ms
Then you need to add a runEvent() function.
This function will be called 100 ms later:
void runEvent()
{
// Do something
if( some_condition )
component.addEvent( time_in_ps ); // You can add more events
}