adding code to control pixel colors from iphone CMMotionmanager