It is currently Fri Nov 16, 2018 1:51 am



Reply to topic  [ 4 posts ] 
 Can FreePie read files? 
Author Message
One Eyed Hopeful

Joined: Sat Mar 11, 2017 9:10 am
Posts: 2
Reply with quote
I have 2 wiimotes and I am planning to use their IR cameras to measure depth. The plan was to use 2 TV remotes, read the signals with the IR cameras as well as read the position of the IR led and translate this into razer hydra output for VR.
BUT AS ALWAYS, I ENCOUNTERED A PROBLEM!!

So, FreePie cannot use the IR cameras in the wiimote (which is not such a big problem as FreePie is still an amazing piece of software) so I found a program that can and I am planning to tweak the code so it can output a file with the positions. Problem is, I don't know how to read file data using FreePie so can anyone help me? Also, please tell me if FreePie can actually read IR camera data and I've just been wrong.

Thank You In Advance


Sun Jan 28, 2018 11:00 am
Profile
One Eyed Hopeful
User avatar

Joined: Sat Jan 27, 2018 10:27 pm
Posts: 24
Reply with quote
As an alternative, why not wrap the code you found into an actual FreePie plugin...that way you can code it in C# and thereby have access to the all the regular C# functionality which you may be more familiar with. This also means that the corresponding code would get started automatically by FreePie instead of having to start it independently.


Last edited by LordAshes on Thu Feb 08, 2018 5:38 pm, edited 1 time in total.



Thu Feb 08, 2018 5:26 pm
Profile
One Eyed Hopeful
User avatar

Joined: Sat Jan 27, 2018 10:27 pm
Posts: 24
Reply with quote
The following code can be used inside FreePie to write a file..

Code:
   f = open("Test.txt","w+")
   f.write("Hello!")
   f.close()


The following code can be used inside FreePie to read a file.

Code:
   f = open("F:\Test.txt","r")
   s = f.read()
   f.close()
   diagnostics.debug("Read: %s" % s)


Thu Feb 08, 2018 5:37 pm
Profile
One Eyed Hopeful

Joined: Mon Jan 15, 2018 3:33 pm
Posts: 9
Reply with quote
You could indeed just write to a file and read from it like you are wondering, but you will probably run into problems with 2 programs accessing the file at the same time. I recommend that you write a plugin for FreePIE in C#. If you use C# then you can use shared Memory-Mapping which is a better solution to what you are trying to accomplish. though I'm not sure it's the best. It's like a file except it's only stored in RAM and not to the HDD increasing read/write time, and more than one program can access it at a time.

Also keep me updated on this if you would, I'm very interested in it. I've put a lot of work into using WiiMotes for VR as well, but I can only make it so perfect without some kind of constant to re-calibrate it with. I may have the best script for it right now. IR camera references might be perfect, especially if you could place them all around the room.


Fri Mar 16, 2018 9:52 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.