Thank you for your reply.
Yes, it's the orientation I'm having issues with. I'm not sure which of the code I need to change.
I'm messing around with the arrow sub-events on 11-14, but there's something else, because that's not working.
I think it has to do with line 10, but not sure how to edit that.
This is what I have thus far: drive.google.com/file/d/1TunWRkgPyS8e5cLYmEjQzSHNo9od3bcs/view
But it only works if the phone is tipped forward a small bit, if the phone isn't tipped forward a little it stops working.
(the image is a fresh copy and not my mangled code)