Hello @poyrazturkoglu

please have a look at the button example here.

I think you are missing an M5.update() inside the loop().

Thanks
Felix