Here's what I have so far. My port (5555) is forwarded, freepie is "On". I'm connected to the correct IP, freepie is running on the computer and I pressed "Start Script" but my mouse just doesn't move when I move my phone.
I've tried these 2 scripts.
Code: Select all
def update():
#Apply deadband filter to avoid drift
#And continousRotation filter to yaw axis to avoid jumps when passing tracker center
x = filters.deadband(filters.delta(math.degrees(filters.continousRotation(android[0].yaw))), deadband)
y = filters.deadband(filters.delta(math.degrees(-android[0].pitch)), deadband)
mouse.deltaX = x * multiply
mouse.deltaY = y * multiply
if starting:
deadband = 0.01
multiply = 5
android[0].update += update
Code: Select all
def update():
global yaw
global roll
global pitch
yaw = android[0].googleYaw + math.pi
roll = android[0].googleRoll
pitch = android[0].googlePitch
if starting:
yaw = 0
roll = 0
pitch = 0
enabled = False
android[0].update += update
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)
if math.fabs(deltaYaw) >= math.pi:
deltaYaw = 0
if (enabled):
mouse.deltaX = -deltaYaw*100
mouse.deltaY = -deltaRoll*200
toggle = keyboard.getPressed(Key.Z)
if toggle:
enabled = not enabled