Use lego wedo 2.0 if you have it, use the tilt sensor and if the tilt device if not working, see inside and connect lego wedo 2.0 using the extensions Type your best below!
100% by me sounds by scratch