I am on a project, where I would have one ir sensor with digital output at one place, where after the program starts, if it triggers for the first time, it should do certain actions like( turning motor1 on), and if it triggers for the second time ( motor2 should turn on), how would you code this in arduino, and I am ready to use two ir sensors for convenience, even then I am stuck on handling this issue.