Two things simultaneously

Hello,

first: sorry for my bad english

i am a software developer and i havn't much experience with microcontroller and stuff like this, but i want to build my own lasertag system.
The Prototyp works fine but i have one problem: when someone is shooting he can not get hit (recieve IR) because the arduino can only handle one thing at a time.
Has someone a idea how i can fix this problem? In "normal" Software i would use Threads, but i dont know if this is possible or there is a better solution for this problem.

Thanks,
bauerbyter

You need to post your code for proper help , however a common issue with code is the use of delay() in the program. While the software is delaying it does nothing else. Look at the blink without delay example in the Playground for an example on how to multitask.

Hi, one of the way you can "multitask" in Arduino is avoiding delay() (busy wait) and using the "Blink without delay" example technique instead.

Also, thinking in terms of state machines instead of sequential code is key.

HTH

PS: if you post your code you'll get more help.