Yeah, look at Kyatric example.
a quick comment. If you want the "zero" point to be somewhere else. you can just add or deduct a number each time you compare the touch.gamma/beta/alfa value
something like(if 40 was your new zero point):
system --> compare two values --> touch.beta >= 40
--- whatever you want to do when the device is tilted forward
system --> compare two values --> touch.beta< 40
--- whatever you want to do when the device is tilted backward
note... it might be the other way around(backward/forward), cant remember the beta numbers. But I hope you get the idea :-)