It seems that GPIO 5 (pin 29) is used by another process: when starting my script I get "...channel already in use..." warning.
Oscilloscope confirms that, because after a reboot, the pin is toggling.
Is there a way to find which script/program is accessing the pin? And in general is there a way to check which pins are already in use by other programs?