UKHeliBob:
Post you program here so that we can see what you are doing. Use code tags (</> top left icon in the forum editor)The symptoms you describe sound like you are using delay() for timing and if so you will need to change to using millis() for timing.
See Using millis() for timing. A beginners guide and Several things at the same time if you are not familiar with how to use millis()
dear, yes the original sketch has delay and I accept them when I modified it also
how does using milis can change it?