DEVICE AND METHOD FOR DETECTING THE PRESENCE AND/OR MOVEMENT OF A THREAD