2

How can I communicate between VB.net and GlovePIE?

I know that you can send OSC (Open Sound Control-It isn't just for sound) data in GlovePIE so if you could send/receive data in VB.net without any libraries that would work but I cannot find any resources.

Please post any code that you can.

EDIT: All I want is a basic way to communicate between GlovePIE and VB.net and I found that you could send OSC data in GlovePIE but you cannot in VB.net I would accept any help that I can get. If you have a better method, feel free to tell me. I am using this guide to send the data.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Anonymous Penguin
  • 2,027
  • 4
  • 34
  • 49
  • 1
    try to revise your question :) – spajce Jan 20 '13 at 19:44
  • @spajce I tried to make it as clear as possible, any tips would be appreciated. All I want is a basic way to communicate between GlovePIE and VB.net so I found that you could send OSC data in GlovePIE. I am going to revise my question now. – Anonymous Penguin Jan 20 '13 at 19:56
  • 1
    we are not sure because even the documentation have no mentioned about manipulating the GlovePIE with .NET, and this applicable only `Windows 2000/XP/Vista. Files are saved as UTF-8.`, the best solution for your problem is to contact the developer of `GlovePIE` – spajce Jan 20 '13 at 20:28
  • @spajce Thank you for your help. This is disappointing, and I bet the GlovePIE developer gets a lot of emails so it would take a lot of time to find out and I don't want to wait very long. Could I use a text document somehow? Also I have the idea where GlovePIE emulates a key press. I could prevent it from doing that when the window isn't open by using the ['Window.Title' code](http://www.glovepie.org/w/index.php?title=Preliminary_Documentation_v0.43#Window). Will try this out. – Anonymous Penguin Jan 20 '13 at 20:43
  • After thinking about it, it wouldn't be a solution because I need data transfer both ways. I _could_ do it only one way if I had to, but I _really_ want it. Would it be simpler to figure out how to not use GlovePIE in the first place? It seems like there would be a solution- GlovePIE seems very sophisticated. – Anonymous Penguin Jan 20 '13 at 20:52
  • 1
    your problem main is _"...except how to receive the data"_ the .NET has a lot of Network Library ([Example](http://stackoverflow.com/questions/46855/c-sharp-game-network-library)), that could work by receiving and transferring data between computers, if you have already a methods to manipulate the `GlovePIE` with .NET you can combine with the Library Network of .NET(for receiving, etc.) and the others for `GlovePIE` methods. thats all I can suggest for now sir :) – spajce Jan 20 '13 at 22:04

1 Answers1

2

After lots of creative thinking, and hours wasted, I finally came up with an idea. (Thanks to spajce for helping me realize there is no perfect solution, and I had to think outside of the box to make this work.) This is what I am going to do. (I have not written the code yet, but I will try to submit it as soon as I write it.)

How I am going to set it up:

  • I will have a form in VB.net that will send data to the COM port. It's GUI will have the user select the COM port and have a button to connect.
  • In my GlovePIE script, I will have it automatically hide itself.

For data transfer to VB.net:

  • GlovePIE will tell if the form is selected using the Window.Title property. If it is, it will emulate a key press. The form will be looking for the keypress.

For Data Transfer to GlovePIE:

  • The form will change the Me.text property to something that has happened. For exaple, I'm building a robot and if the ping sensor senses something, my Aduino will send the data over serial, to VB.net, which will change the title to "Robot Connect-OBJECT DETECTED" GlovePIE will know the multiple names the form might be, and when searching to see if it is active, it can tell if something has been detected. VB.net will change the title back to "Robot Connect" after GlovePIE signals it has recived the signal.

There will be some bugs, but VB.net is smart enough to tell if another window is the active one. If you are browsing this question, you may have to adapt this. I will have to put a couple of safety features to prevent the robot from not stopping when the VB.net window loses focus.

Thanks to anbody who tried to help.

Anonymous Penguin
  • 2,027
  • 4
  • 34
  • 49