The Empty’s rotation is always 0 because it is parented to the bone. The Empty does not move or rotate, it appears to rotate because the bone is moving. You have a couple of options for getting the rotation data.
Most people that do these kinds of Arduino experiments access the bone data directly. The data you are looking for is stored in the ‘PoseBone’ data for your armature. If memory serves, you can access the data something like this:
import bpy
# Assumes that your armature is the active object in the current view
armObj = bpy.context.active_object
pose = armObj.pose
for pBone in pose.bones:
print(pBone.rotation_euler)
Also note that Blender defaults to using quaternion’s for bone rotations, you will have to change your rotations to euler rotations, which are better for servo robotics experiments.
hi kastoria,
thank you very much for your reply.
i have just seen your post now.
allready solved the problem,
but your solution works much better.
kind regards,
chris