As was mentioned in this forum post I have published a first version of a gyroscope extension for Defold. The extension is pretty straight forward to use:
function init(self)
gyro.start(function(self, pitch, roll, yaw, quatx, quaty, quatz, quatw)
go.set_rotation(vmath.quat(quatx, quaty, quatz, quatw))
end)
end
function final(self)
gyro.stop()
end
The project also includes an example that uses the Defold camera extension to create an augmented reality experience: