Buttons to start different loops

Thanks for this i can get it to start the loop but it wont switch to the other loop when the other button is pressed

Without seeing your code, all I can suggest is that you rewrite the functions so that doesn't happen. Most likely, you have delay()s all over the place. Get rid of them, using the methodology taught in the blink without delay example.