FreePIE Help, cant get it to work with phone.

Official forum for open source FreePIE discussion and development.
Post Reply
Nyminix
One Eyed Hopeful
Posts: 2
Joined: Wed Apr 01, 2015 5:11 am

FreePIE Help, cant get it to work with phone.

Post by Nyminix »

Hi, I have a Samsung S4, and I have FreePIE IMU on it, but I can't seem to get it to work.

Code: Select all

def update():
	global yaw
	global roll
	global pitch
	yaw = -android[0].googleYaw
	roll = -android[0].googleRoll
	pitch = android[0].googlePitch

if starting:
	yaw = 0
	roll = 0
	pitch = 0
	enabled = False
	android[0].update += update

diagnostics.watch(yaw)
diagnostics.watch(roll)
diagnostics.watch(pitch)

deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)

if (enabled):
	mouse.deltaX = -deltaYaw*600
	mouse.deltaY = -deltaRoll*1000

toggle = keyboard.getPressed(Key.M)

if toggle:
	enabled = not enabled
That's the code I'm using. So on FreePIE on PC, I'd start the script, and press the lett M to let it start. But in the console, the values of yaw, pitch and roll are still all 0.
Only thing that comes to mind is maybe the IP is wrong? Is it meant to be my IPv4 Address or my modem address (192.168.1.1). I'm using the modem address.
Okay, pinged the phone to my computer, works fine. And the debug with the IMU are displaying values.
Also, would Oculus games work with this headtracking?.
Nyminix
One Eyed Hopeful
Posts: 2
Joined: Wed Apr 01, 2015 5:11 am

Re: FreePIE Help, cant get it to work with phone.

Post by Nyminix »

Okay i got it to detect it. Had to connect to my computer's LAN IP address instead. But my mouse isn't moving, is this meant to be normal?
The diagnostic test is now displaying values.
EDIT: Nevermind, got it to work lol...
Post Reply

Return to “FreePIE”