The ultimate orb solution, at last.

SpaceOrb drivers and software discussions
Forum rules
User avatar
countryatheart
Posts: 76
Joined: February 23 2006, 22:02 PM
Location: New Kent, Virginia

Re: The ultimate orb solution, at last.

Postby countryatheart » February 04 2009, 21:10 PM

Sorry I am late replying back to you Victor. I worked very late last night with the software and today I’ve have been very busy at work and didn’t have a chance to reply.



Things didn’t workout like I hoped they would. I didn’t have a Arduino folder in My documents so I created one and unzipped the orbsketches into it. In the Arduino environment I went to file/sketchbook/hidsorb and uploaded it to the I/O board (orbshield connected to the Arduino and both switches off). Upload went will, I unplugged the USB from the Arduino and plugged it into the orbshield with dip switch 1 on and the orb connected. I heard no sounds but windows said it found New Hardware then New Hardware was installed and ready to use. I was a very happy camper at this point! I went to control panel/printers and other hardware/game controllers and the Orb showed up as a “Usbjoystick”. I then tried to test it (nothing worked) and then calibrate it, nothing worked. I tried a couple of the other Orbs and they didn’t work.



It is late and I am very tired so I’ll start troubleshooting tomorrow night.



Ron

vputz
Posts: 340
Joined: March 25 2006, 20:21 PM
Contact:

Re: The ultimate orb solution, at last.

Postby vputz » February 05 2009, 3:44 AM

Hmm, some discouragement, but that's progress actually. If it showed up as UsbJoystick and had all axes/buttons, that means the USB side of things was working, which is really good news (the USB tends to be a "it works or it doesn't" proposition). Now we just need to get the serial side sorted; it must be that the shield isn't seeing serial comm from the orb (or is having some other problem with it).



The Orb1 sketch is probably the way to go for this; try running that (with dip switch 1 on, dip switch 2 off) with the Arduino USB port plugged in (not the one on the shield), and click the "Serial Monitor" button on the Arduino program (looks kinda like a flashlight). You should see it say "Hello World!" and then spew packets at you. It may not, which would indicate a problem on the serial side.



If not, hmm. May need to do more electrical trace checking on the connections from the Arduino pins 0 and 1 to the Max233, and around the serial port.



At any rate, this is invaluable--thanks a ton for helping test; I know it's pretty frustrating.

User avatar
countryatheart
Posts: 76
Joined: February 23 2006, 22:02 PM
Location: New Kent, Virginia

Re: The ultimate orb solution, at last.

Postby countryatheart » February 05 2009, 22:13 PM

I followed your instructions and opened the Orb1 (I didn’t upload it to the Arduino board, Should I?) in the Arduino environment then clicked the Serial Monitor, It didn’t do anything. I then rechecked the Orbshield with a mulimeter, checking between the IC socket contact sockets (with the MAX233 chip removed) and the corresponding DP9 plug pins and Arduino header pins. All connections are intact with no shorts. I also checked the dip switches to make sure they opened and closed, they checked out ok. I am wondering if my Max233 chip is bad? I know these chips are sensitive to static electricity, I handled the chip very carefully but it is possible it got zapped. If I can’t get the orbshield working I will order a new one.



Software questions;

1. Did you upload any other sketches (besides the HidSorb) to the Arduino?

2. The Spaceorb files that I unzipped into the Ardunio hardware/libraries show up in the Arduino environment under sketch/import library. Do the Spaceorb files need to be opened while using the Orb? I did try this and it didn’t work but I had to ask.

3. Under Tools there is a Burn Bootloader, did you upload any of these files?

4. How do I clear the memory on the Arduino, Tools/Auto Format? I tried to find this info on Arduino’s website but I

didn’t. I want to know just for my own info if I need to upload edited files.



I am looking forward to your response Victor and any help you can offer.



Ron

vputz
Posts: 340
Joined: March 25 2006, 20:21 PM
Contact:

Re: The ultimate orb solution, at last.

Postby vputz » February 06 2009, 3:30 AM

[quote]I followed your instructions and opened the Orb1 (I didn’t upload it to the Arduino board, Should I?)[/quote]

Ah! I'm sorry--yes, that's what I meant: upload it to the Arduino. The Arduino editor software doesn't actually run anything by itself; it's only interesting if you upload to the orb. So yes--upload to the board and see what happens (connect the USB port to the Arduino plug, dip switches off, upload, dip switch 1 on, click "serial monitor"--should get "Hello World" and then if orb is talking some communication). Actually, read below and consider uploading the "ASCII Table" example to check basic communications between Arduino and computer, then try Orb1 to check orb to arduino. Don't forget the dip switch flipping business!



Good testing with a multimeter (that's how I had to test my board; lots of things were wrong). Since I'm not sure on your electronics experience, I was worried about the Max233 being inserted wrong, but it looks great in your pic (your board looks a lot better than mine!).


[quote]I handled the chip very carefully but it is possible it got zapped. If I can’t get the orbshield working I will order a new one.[/quote]

Possible, but I'd be a little surprised (just that I've abused mine pretty well and it's still working).


[quote]Software questions;

1. Did you upload any other sketches (besides the HidSorb) to the Arduino?
[/quote]


I have (an LED blinky example and such) but that shouldn't be the problem. You might want to try that actually to test the Arduino's communication to the computer... go to the Arduino environment, then open File->Sketchbook->Examples->Communication->Asciitable. Upload that to the Arduino and click the serial monitor--you should see the Arduino spitting out a table of ASCII characters. Then try Orb1 again.


[quote]
2. The Spaceorb files that I unzipped into the Ardunio hardware/libraries show up in the Arduino environment under sketch/import library. Do the Spaceorb files need to be opened while using the Orb? I did try this and it didn’t work but I had to ask.[/quote]


No, on the second part. Once the Arduino is programmed, it is on its own; once we get your shield working, you could program it at one computer and take it to another computer (or presumably a USB-compatible game console) without any of the Arduino software installed and still have an orb working.



As for the first part, that is a bit weird, because it DOES show up for me under "import library". It sounds like yours compiled and ran OK, though. Hmm. I'm not sure what's going on there. For example, mine would be "c:\bin\arduino\hardware\libraries\SpaceOrb"; presumably yours would have a different "c:\bin" part but would otherwise be the same.


[quote]
3. Under Tools there is a Burn Bootloader, did you upload any of these files?
[/quote]




No--and you shouldn't have to! The bootloader is what allows you to upload software to the Arduino using the Arduino environment; changing the bootloader is unnecessary except for special applications.


[quote]
4. How do I clear the memory on the Arduino, Tools/Auto Format? I tried to find this info on Arduino’s website but I

didn’t. I want to know just for my own info if I need to upload edited files. [/quote]


Just upload the new sketch (it clears the old one). Since we'll have to do that when changing bindings or other options, it's good you asked. In fact at some point I'd like you to recompile the Orb1 and/or Hidsporb sketches and see if they really don't have the SpaceOrb library available (that shouldn't be a problem if you've already uploaded, but it may be just using the existing sketch).



I know this has got to be immensely frustrating, but I really appreciate the input and feedback (I'm learning a lot about what should go in the documentation, if nothing else!). You've earned a free board-- I'll send you a populated and tested one once they come in.

User avatar
countryatheart
Posts: 76
Joined: February 23 2006, 22:02 PM
Location: New Kent, Virginia

Re: The ultimate orb solution, at last.

Postby countryatheart » February 06 2009, 23:27 PM

Thank you Victor for your info! It was a great help knowing how the Arduino environment (I call it environment because that is what the Arduino Guide calls the program.) and how your files work. I am sorry I know very little about the Arduino software, I am trying to learn it in a very short timeframe so the tests you need are successful.


[quote]As for the first part, that is a bit weird, because it DOES show up for me under "import library". It sounds like yours compiled and ran OK, though. Hmm. I'm not sure what's going on there. For example, mine would be "c:\bin\arduino\hardware\libraries\SpaceOrb"; presumably yours would have a different "c:\bin" part but would otherwise be the same.[/quote]

My SpaceOrb files are at “c:\program files\Arduino-0012\hardware\libraries\SpaceOrb”. I ran a search on my system (XP Pro) and it didn’t find a c:\bin? I extracted the Arduino files in c:\program files. Did I extract the files in the wrong Place? I was surprised that the files didn’t have an executable to install the files. I am VERY concerned about this!! This might be why the Orbshield isn’t working. Any info from you would be greatly appreciated Victor.



Here are the results of the tests I ran tonight;



I uploaded the Asciitable to the Arduino and ran the serial monitor, like you said it spit out a table of ASCII characters. Too many characters to write down so I hope you didn’t need that info.



Then I uploaded the Orb1 and ran the serial monitor. Looks like it talked to the SpaceOrb, here is the info.



CBNTFT? FR? P@r@rmssvzBcCcCcC hello world



452 bytes free



Size of orb-buffer: 44



Size of Orb-Translator: 21



Is this good or bad? The question marks do bother me.



I want to Thank You for offering to send me a free board Victor!! I do want one of your manufactured populated boards but I want to pay for it. You need to understand that I am doing what I can for you and the SpaceOrb community, I want your Orbshield to work for everyone. Your hard work has made our lives more enjoyable over the years!



It is late and I am very tired. I’ll be happy when we have my Ordshield working. I spend so much home time on my computer that my lady is giving me the mid-evil looks and I need to repair the wall beside my desk that I’ve be beating my head on. (Big Grin)



Ron

vputz
Posts: 340
Joined: March 25 2006, 20:21 PM
Contact:

Re: The ultimate orb solution, at last.

Postby vputz » February 07 2009, 4:10 AM

Ron, take some time off! :D



Actually, let me recreate my local orb programs to be SpaceOrb specific again and send you the new versions; maybe something was mid-edit when I uploaded those old ones. They don't look bad "by eye", but the "CBNTFT? FR? P@r@rmssvzBcCcCcC" is a SpaceBall4000 setup string, so now I'm all confused about which version you're using and such. We'll both get on the same page with a SpaceOrb and see what happens.



The good news is that if the ASCII table app worked, the Arduino-to-serial part works. And if it actually saw a USB Joystick when you used the HidSporb sketch, the USB part works. So the problem is either in the orb-to-shield serial connection or the software.



We'll get it working (or get a replacement)--I have faith! But I know how these projects can take waaaaay more time than you (or spouse) planned.

vputz
Posts: 340
Joined: March 25 2006, 20:21 PM
Contact:

Re: The ultimate orb solution, at last.

Postby vputz » February 07 2009, 6:21 AM

OK, Ron, something new to try REAL QUICK (don't take much time on this!).



Here are new zip files for library and sketches. I'm a little new at distributing Arduino software, so I'm trying a slightly different approach here (only including source files for sketches, but including the precompiled library, which is I think how I got it). But first:


[quote]My SpaceOrb files are at “c:\program files\Arduino-0012\hardware\libraries\SpaceOrb”. I ran a search on my system (XP Pro) and it didn’t find a c:\bin? I extracted the Arduino files in c:\program files. Did I extract the files in the wrong Place? I was surprised that the files didn’t have an executable to install the files. I am VERY concerned about this!![/quote]

No, that should be fine! The Arduino folks have a bit of a Linux-ish background where writing an installer is extra fuff they don't want to deal with (if I read 'em right). And it runs on different platforms. So there's no installer at all; you just unzip wherever. I created c:\bin because in unix/Linux, the "/bin" directory is where executables go; you can put it anywhere. So that should not be a problem! If anything, I've put it in a weird place, not you.



I'm a little confused that it didn't have "SpaceOrb" as a library under "Sketch, Import library", because it works that way for me. But even so I'm surprised that it compiled if it didn't see the library.



Anyway, here's what I want you to try:


[list]
  • [*]remove your old hardware/libraries/SpaceOrb directory and unzip the "libraries.zip" file into "hardware/libraries"--so you should have a new hardware/libraries/SpaceOrb).

  • [*]Go to where the Arduino sketches are, and delete the old ones (HidSporb and orb1). Unzip "sketches.zip" in its place (so for me, this is "My Documents\Arduino\BasicOrb" and "My Documents\Arduino\OrbShieldSerialTest1").

  • [*]Open the Arduino software and load the "OrbShieldSerialTest1" sketch (File->Sketchbook->OrbShieldSerialTest1)

  • [*]Make sure both dip switches are off, and the SpaceOrb360 is plugged into the shield, then plug in the Arduino via the programming port

  • [*]Make sure your board is selected (Tools->Board; if you bought it recently you probably have a Diecemila or a Duemilanove--you probably already did this)

  • [*]Make sure the right com port is selected (Tools->Serial Port; you almost certainly did this already if you've uploaded something!)

  • [*]Upload the sketch (control-U or "File->Upload to I/O board"). After a pause, the window should say
    [code]Binary sketch size: 4510 bytes (of a 14336 byte maximum)[/code]
    If it doesn't and there's an error, let me know (or try to troubleshoot). I didn't include the compiled versions of things, so this may force the issue of whether it can see the SpaceOrb library. Also let me know if it does seem to work but the size is different!

  • [*]Click the "Serial Monitor" button. After a while, the window should say
    [code]This sketch simply takes input from the OrbShield's serial port
    and sends it out the serial port. DIP switches should be set with
    switch 1 (nearest to the serial port) ON, switch 2 OFF
    Serial dump follows:
    [/code]

  • [*]Click dip switch 1 ON, leaving switch 2 OFF. You should almost immediately see lines like
    [code]K(75)
    ä(228)
    ?(128)
    ?(128)
    ¯(175)
    (13)
    K(75)
    ä(228)
    ?(128)
    ?(128)
    ¯(175)
    (13)
    [/code]
  • [/list]


    Post results here. If you don't see anything after clicking switch 1 on (leave switch 2 off) then we are zeroing in on the problem and the issue has to do with getting the serial signal to the Arduino (whether it's the connections, the Max233, or what is still up in the air, but it's a start).



    If you DO see those messages after clicking the switch on, the news is even better and at least it's talking, so try uploading the "BasicOrb" sketch (with switches off), then put switch 1 on, unplug the arduino side, plug in the SpaceOrb side, and see if you have a controller.



    Either way, don't spend too much time on it--just try those and see what you get!



    Vic
    Attachments
    libraries.zip
    (121.83 KiB) Downloaded 301 times
    sketches.zip
    (1.34 KiB) Downloaded 303 times

    User avatar
    countryatheart
    Posts: 76
    Joined: February 23 2006, 22:02 PM
    Location: New Kent, Virginia

    Re: The ultimate orb solution, at last.

    Postby countryatheart » February 07 2009, 12:54 PM

    Sorry about the software confusion, I was using your latest beta files from your Orbduino website. We talked about these files in earlier post.


    [quote="vputz"]I'm a little confused that it didn't have "SpaceOrb" as a library under "Sketch, Import library", because it works that way for me. But even so I'm surprised that it compiled if it didn't see the library.[/quote]
    I deleted your old files and added your new ones. Then after running the test today I checked the Arduino/sketch/import library and the SpaceOrb still shows up.


    [quote="vputz"]Upload the sketch (control-U or "File->Upload to I/O board"). After a pause, the window should say



    Code: Select all

    Binary sketch size: 4510 bytes (of a 14336 byte maximum)[/quote]

    My results were the same as yours “word for word”.


    [quote="vputz"]Click the "Serial Monitor" button. After a while, the window should say



    Code: Select all

    This sketch simply takes input from the OrbShield's serial port

    and sends it out the serial port. DIP switches should be set with

    switch 1 (nearest to the serial port) ON, switch 2 OFF

    Serial dump follows:[/quote]

    Again, my results were the same as yours “word for word”.


    [quote="vputz"] * Click dip switch 1 ON, leaving switch 2 OFF. You should almost immediately see lines like



    Code: Select all

    K(75)

    ä(228)

    ?(128)

    ?(128)

    ¯(175)

    (13)

    K(75)

    ä(228)

    ?(128)

    ?(128)

    ¯(175)

    (13)
    [/quote]

    This worked also, to many codes to list here, see OrbSieldSerialTest1 zip.[attachment=0]OrbShieldSerialTest1 results.zip[/attachment]

    [quote="vputz"]If you DO see those messages after clicking the switch on, the news is even better and at least it's talking, so try uploading the "BasicOrb" sketch (with switches off), then put switch 1 on, unplug the arduino side, plug in the SpaceOrb side, and see if you have a controller.[/quote]
    Good News Victor, after uploading your BasicOrb the Orb still shows up under Game Controllers as a UsbJoystick but the Axis and Buttons work now!! Isn’t that Great! I hope your as excited about this as I am. :D



    Ron
    Attachments
    OrbShieldSerialTest1 results.zip
    (6.53 KiB) Downloaded 301 times

    vputz
    Posts: 340
    Joined: March 25 2006, 20:21 PM
    Contact:

    Re: The ultimate orb solution, at last.

    Postby vputz » February 07 2009, 15:50 PM

    Justice!



    Ah, that's great news! Well, sorry that was frustrating, but it was good to go through and will make a lot of great inputs for the documentation.



    Now I just need to poke the hardware folks and ask where our boards are!

    User avatar
    countryatheart
    Posts: 76
    Joined: February 23 2006, 22:02 PM
    Location: New Kent, Virginia

    Re: The ultimate orb solution, at last.

    Postby countryatheart » February 07 2009, 23:43 PM

    Yes, it was a little frustrating. On the other hand it was very rewarding fabricating your OrbShield from scratch. I have learned so much from you and can’t tell you how thankful I am for the experience.



    Tomorrow I will install Half-life 2 and see how the Orb works in a game (after I fix the wall beside my desk) :) . Hopefully it will go well.



    Good luck with the new boards and let us know how when you receive them.



    Ron

    vputz
    Posts: 340
    Joined: March 25 2006, 20:21 PM
    Contact:

    Re: The ultimate orb solution, at last.

    Postby vputz » February 08 2009, 11:21 AM

    Good stuff!



    Though you're not done with feedback yet :D . Try HL2 (configuration is a PAIN by the way, but doable), and I'm very curious to know what you think of the scaling... what I mean is that the orb and the original hidsporb driver had a cubic scaling via the sensitivity curve and this is more linear... we may have to add that later although it looks quite doable.

    User avatar
    countryatheart
    Posts: 76
    Joined: February 23 2006, 22:02 PM
    Location: New Kent, Virginia

    Re: The ultimate orb solution, at last.

    Postby countryatheart » February 08 2009, 20:03 PM

    Ok, I didn’t repair the wall so let the testing continue. Half-life 2 wasn’t the best decision for the first test but it’s installed and I played with it for a long time trying the get the Orb working properly. Before I explain the results you should know I held the Orb in the horizontal & vertical position (it worked the best in vertical position) while checking the axis in the game. In Options/Mouse I checked Joystick and when a few axis didn’t work I tried every combination settings available. In the keyboard options I could program the buttons and they worked perfectly. I tried to program the axis (that didn’t work in the game) to the keyboard/button functions but didn’t have any luck with that. The axis that worked the movement was slow, adding the sensitivity curve is a very good idea.



    Now for the test results (Orb vertical position):



    Axis TZ (forward or backward) worked well.



    Axis RY (turn left or right) worked well.



    Axis TX (strafe left or right) wouldn’t strafe, it turned like axis RY.



    Axis RX (look up or down) didn’t work.



    Axis TY (jump or duck) didn’t work.



    Axis RZ (lean left or right) didn’t work.



    I tried calibrating the Orb in Usbjoystick, properties, test and settings, it didn’t help with the problem. Then I tried the test with axis RX, TY and RZ. The crosshair in the box didn’t move but the red bars (Z axis, X, Y and Z rotation) moved up and down. What up with that?



    What’s it for tonight Victor, let me know what you want me to do next.



    Ron

    vputz
    Posts: 340
    Joined: March 25 2006, 20:21 PM
    Contact:

    Re: The ultimate orb solution, at last.

    Postby vputz » February 09 2009, 3:06 AM

    Hm, ok.



    I'm not totally surprised by HL2 being a bit confused, but I'm testing with L4D which is essentially the same engine, and I have TF2 here which is about the same as well. To get the orb to work you'll almost certainly have to use the console and/or write a CFG file. I'll try to add the response curve tonight and see what the results are, and post a config file which may at least move you around.


    [quote]Then I tried the test with axis RX, TY and RZ. The crosshair in the box didn’t move but the red bars (Z axis, X, Y and Z rotation) moved up and down. What up with that? [/quote]

    Not sure; it should work on all axes. May have to reset the calibration after the next update.



    Addendum: first batch of 5 boards is shipped; hope to see them before too long.

    vputz
    Posts: 340
    Joined: March 25 2006, 20:21 PM
    Contact:

    Re: The ultimate orb solution, at last.

    Postby vputz » February 09 2009, 16:45 PM

    Okay, new update (same deal as old; remove the SpaceOrb file from hardware/libraries, remove sketches, install these two zips).



    Changes: Added gain and sensitivity.



    The way this works is that the orb puts out a value -512 to +512. This is then changed a few times:
    [list]
  • [*]Polarity swaps this value around zero (so -10 becomes +10, etc)

  • [*]Gain is from -5 to 5 and amplifies it (negative numbers divide, so if the orb was reading "10", with gain 5 it would be "50" and with gain -5 it would be "2")

  • [*]Finally the value is looked up in a sensitivity table and converted to a 0-1023 value
  • [/list]


    The sensitivity table looks something like this (courtesy of someone in utexas who has all the old hidsporb docs online, for some reason)

    [img]http://www.tacc.utexas.edu/~kelly/NEW_DOCS/public_html/TACC_stuff/hardware/VR_devices/hidsporb/documentation/images/orb_sensitivities.jpg[/img]



    So the original SpaceOrb curve, if I remember right, is curve 4.



    So Ron, I need you to play with the "HidSporb" sketch now. Ignore the keyboard/mouse binding stuff unless you want to just screw around with it. Look in the setup() function for these lines:
    [code] translator.set_gain( 0 );
    translator.set_sensitivity_table( sensitivity_4_chart );
    [/code]


    Try it the way it is and play with the control panel applet; you should feel like the orb is "more accelerated" toward the edges.



    Then try changing the gain ( translator.set_gain(2) for example). The orb should feel a bit more lively. At gain 5, it's pretty jittery.



    Anyway, see if those help.



    BY THE WAY, just to document it: for some reason L4D (and thus all Source games) decided it hated my orb; I had the control panel applet just fine, but L4D and Portal just completely ignored it. I wound up deleting a bunch of registry keys related to the orb and it "came back"--WEEEIRD.



    Oh, and on the subject of valve games:



    The Source engine does joystick configuration through .cfg files or at the console (you may have known this, but...). So you may have to fiddle with the developer console a bit. Try these commands (ignore the comments when typing them in of course):


    [code]
    joystick 1
    joy_advanced "1" // use advanced joystick options (allows for multiple axes)
    joy_advaxisx 3 // x-axis controls GAME_AXIS_SIDE (strafing left and right)
    joy_advaxisy 1 // y-axis controls GAME_AXIS_FORWARD (move forward and back)
    joy_advaxisz 0 // z-axis is treated like a button
    joy_advaxisr 4 // r-axis controls GAME_AXIS_PITCH (look up and down)
    joy_advaxisu 0 // u-axis controls GAME_AXIS_YAW (look left and right)
    joy_advaxisv 2 [/code]

    [/code]



    That ... [i]should[/i] get the axes mapped right. The Z axis... well, not sure how to deal with that yet. It works like jump/duck for me, but I didn't ask it to, so I don't trust that.



    Sensitivities can be changed in the console too:


    [code]joy_forwardsensitivity -1.0 // movement sensitivity
    joy_sidesensitivity 1.0
    joy_forwardthreshold 0.1 // movement dead zone settings
    joy_sidethreshold 0.1
    joy_pitchsensitivity -1.0 // look sensitivity
    joy_yawsensitivity -2.5
    joy_pitchthreshold 0.1 // look dead zone settings
    joy_yawthreshold 0.0
    [/code]


    Play with those a bit and see what you think. There are some guides out there for joystick configuration in source games, which may help some.
    Attachments
    sketches.zip
    (199.77 KiB) Downloaded 292 times
    libraries.zip
    (154.5 KiB) Downloaded 294 times

    User avatar
    countryatheart
    Posts: 76
    Joined: February 23 2006, 22:02 PM
    Location: New Kent, Virginia

    Re: The ultimate orb solution, at last.

    Postby countryatheart » February 09 2009, 21:31 PM

    Thank you Victor for the new software updates. I can see you have been working very hard and really appreciate all the info you give to me. I am too tired tonight to check out your software and instructions. I had a long day (14 hours) at work and just returned home, too tired to do anything tonight. I’ll work on it tomorrow night, hope you understand.



    Ron


    Return to “Spaceware Software”

    Who is online

    Users browsing this forum: No registered users and 2 guests