How to run Two codes at same time

Do not use delay(), use a millis() timer instead.

See: