If all you are looking for is a means of rotating the model view matrix for your scene, you could look at the source code to my Molecules application or an even simpler cube example that I wrote for my iPhone development class. Both contain code to incrementally rotate the model view matrix in response to touch input, so you would just need to replace the touch input with accelerometer values.

Additionally, Apple's GLGravity sample application does something very similar to what you want.

Ye, I can rotate object/camera. My main problem is to combine somehow the accelerometer values with the compass values, and tackle the upside-down cases. GLGravity uses only accelerometer, so its only the half of the picture.
–
GeriJun 13 '10 at 0:43

Hey, thanks for the reply anyway. You're the only who tried to help so far.
–
GeriJun 13 '10 at 12:26