Example by Jonathan Hammond

Level Meter

Use Device Motion to check if the device is level.