Meant to be Seen
https://www.mtbs3d.com/phpbb/

Can FreePie read files?
https://www.mtbs3d.com/phpbb/viewtopic.php?f=139&t=22674
Page 1 of 1

Author:  Abbeynesh [ Sun Jan 28, 2018 11:00 am ]
Post subject:  Can FreePie read files?

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

Author:  LordAshes [ Thu Feb 08, 2018 5:26 pm ]
Post subject:  Re: Can FreePie read files?

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.

Author:  LordAshes [ Thu Feb 08, 2018 5:37 pm ]
Post subject:  Re: Can FreePie read files?

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)

Author:  linkoid [ Fri Mar 16, 2018 9:52 am ]
Post subject:  Re: Can FreePie read files?

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/