Is is possible to run two loops simultaneously??

You need to use timers and maybe interrupts (though this doesn't sound timing-critical so maybe ditch the interrupts). It's covered in the example sketches as suggested.