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 » January 27 2009, 21:06 PM

Yes Victor, it was a scaling problem with Adobe Reader, I should have checked the dimensions on the print first. I didn’t have much (play) time last weekend and really wanted to etch the board so it was my screw-up. I downloaded your orbshied.zip and the Eagle software, opened your Test 4 drawing and schematic and printed it, drawing dimensions were perfect! Then I tried saving it to a PDF a number of times using different settings, I never could get the dimensions right. I will work around this after playing with the file awhile.



I hope to etch a new board this weekend but before I do I want to change your schematic. I am removing the traces 4,5,6 and 7 from the Arduino to the dip switch so my new board will have a 2 position dip switch. If you see a problem with please don’t hesitate to tell me. I will post soon pictures when I have it etched. Hopefully I’ll do a better job of it then I did the last time. (etching and posting pictures)



Ron

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

Re: The ultimate orb solution, at last.

Postby vputz » January 28 2009, 6:08 AM

Ron--



Those should be fine (removing traces from the arduino to the DIP). If you do that, you can clean up the ground trace a bit if you want (on the "Max233" side of the DIP), but make sure it still connects to what it's supposed to connect to. I will post the new two-sided board soon; it's a bit more complicated for a home etch just because the traces are a bit thinner and I moved everything inside the Arduino pins, but may be fine; I'm not sure.


[quote]I downloaded your orbshied.zip and the Eagle software, opened your Test 4 drawing and schematic and printed it, drawing dimensions were perfect! Then I tried saving it to a PDF a number of times using different settings, I never could get the dimensions right.[/quote]

Hm! Nothing wrong with printing right from Eagle, though.



Some more changes coming to the software. The SRAM on the Arduino is only 1024 bytes, and we're getting close to that limit, embarassingly--worse, I still want to do an AVRUSB version, and those chips only have 512 bytes SRAM (!). A lot of our memory usage is "static" data that won't change much between flashes--such as scaling, polarity, axis mapping, button mappings, etc (the button-axis mappings take up "a lot" of memory, where "a lot" is around 7 bytes per mapping, but every byte counts). I'm going to move a lot of that into "flash memory" which is much more expansive, and I think that may open up the "custom sensitivity curves" idea again--the disadvantage is that you won't be able to change that in real time, you'd have to reflash the orb (which only takes a few seconds, so that should be fine). The orb feels weird with a linear response, and I'm not sure how much math we want the thing to do in real-time (it may be fine; I should try). So maybe more on that this weekend plus mouse mapping, and we may be finally crawling toward something nice and general. Boards probably won't be done until early Feb, so that's fine too.

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 » January 28 2009, 13:28 PM

[quote]"Hm! Nothing wrong with printing right from Eagle, though.[/quote]

I use the laser printer at work. I need an alternative program to save the file so I don’t have to install Eagle software on my work computer.

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

Re: The ultimate orb solution, at last.

Postby vputz » January 28 2009, 14:08 PM

Ah sure, makes sense.



Of note: when I made my board, I never DID get the laser printer to accept paper from the external feed (or other tray) and wound up using a photocopier to copy the pattern onto my magazine paper for toner transfer. Worked okay, but not quite as nice.

SkyShepherd
Posts: 1
Joined: January 29 2009, 1:46 AM

Re: The ultimate orb solution, at last.

Postby SkyShepherd » January 29 2009, 1:56 AM

Gentleman,



I have been hoping and waiting for a pure hardware solution for the SpaceOrb, and I thought I would never see it work with Vista.



I can't describe the time spent combing through countless pages for answers, and I am VERY happy to have stumbled upon the efforts here!



I would be SO happy to buy a PCB ready to populate (or even already populated), and get my poor neglected SpaceOrb some much-needed HalfLife2 time.



Victor, very well done! I am looking forward to your updates.



To Jay, thanks for keeping the spaceorb information alive through the years! It's nice to find a group still dedicated one of the best gaming devices ever made.



Darrin

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

Re: The ultimate orb solution, at last.

Postby vputz » February 01 2009, 14:49 PM

Okay, busyish weekend in OrbDuino-land! (heh).



1) Okay, I think bindings are basically done; maybe some tweakings. I have tweaked things so that bindings take place in PROGMEM (flash memory) so we've got plenty of SRAM, or so it seems. To do bindings, you just create some structures, and set them. Here's a basic Orbduino sketch:


[code]
#include "orb_device.h"
#include "orb_translator.h"
#include "hid_keys.h"

Logical_orb orb_buffer( SpaceBall4000 );
Orb_translator translator;
byte b;
boolean has_initialized_orb=false;

PROGMEM Axis_key_binding axis_key_bindings[] =
{
{ 0, 0, 255, 0, KEY_O },
{ 0, 768, 1023, 0, KEY_U},
{ 1, 0, 255, 0, KEY_PERIOD},
{ 1, 768, 1023, 0, KEY_E},
{ 5, 0, 255, 0, KEY_COMMA },
{ 5, 768, 1023, 0, KEY_P }
};

PROGMEM Button_key_binding button_key_bindings[] =
{
{ 0x01 << 1, MOD_SHIFT_LEFT, 0 },
{ 0x01 << 2, 0, KEY_H },
{ 0x01 << 3, 0, KEY_E },
{ 0x01 << 4, 0, KEY_L },
{ 0x01 << 5, 0, KEY_O }
};

PROGMEM Axis_mouse_binding axis_mouse_bindings[] =
{
{ 0, MOUSE_AXIS_X, 3 },
{ 1, MOUSE_AXIS_Y, 3 }
};

PROGMEM Button_mouse_binding button_mouse_bindings[] =
{
{ 0x01, 0x01 },
{ 0x01 << 1, 0x01 << 1 },
{ 0x01 << 2, 0x01 << 2 }
};

void setup()
{
Serial.begin( 9600 );

translator.set_chording( false );
translator.set_axis_map( Axis_map_spaceball_4k );
translator.set_polarity( Polarity_spaceball_4k );

//translator.set_axis_key_bindings( axis_key_bindings, 6 );
//translator.set_button_key_bindings( button_key_bindings, 5 );
translator.set_axis_mouse_bindings( axis_mouse_bindings, 2 );
translator.set_button_mouse_bindings( button_mouse_bindings, 3 );
}

void loop()
{
orb_device.refresh();
if ( Serial.available() )
{
b = Serial.read();
orb_buffer.add_byte( b );
if ( orb_buffer.has_changed() )
{
if ( (!has_initialized_orb) && (orb_buffer.physical_buttons & 1) )
{
orb_device.safe_send_serial_P(spaceball_setup_string);
has_initialized_orb = true;
}
else if ( has_initialized_orb )
{
}
//orb_device.refresh();
//translator.translate_orb( orb_buffer, orb_device );
//orb_buffer.log_change();
translator.update(orb_buffer, orb_device);
}
}
}
[/code]


(some of that will make better sense with a bit of documentation).



At any rate, the orb can now produce joystick, keyboard, and mouse events, which is well exciting (what with typing using the orb buttons, or dragging windows around and such). Good stuff! I think I may need to change the Vendor ID and Product ID to match the one provided in the library (for the original project, we sorta just got away with IDs we had no right to, but I'd like to be a bit more legal this time).



2) Latest beta files are available on the Orbduino website ([url]http://orbduino.sourceforge.net[/url]), although the website looks absolutely terrible. I'll update that later.



3) Well, I tried... there's a great little device called the "Teensy" which claims to work with the Arduino environment but has a tiny little bit of closed-source proprietary code. It would have been a great thing for us, because it uses that AT90USB chip, and would have GREATLY simplified things (we could just have the Teensy, a Max233, and a DB9 serial plug, and that's it, no Arduino board at all). Unfortunately the fellow who designed it doesn't seem to "get" the idea of open-source, and when I tried to persuade him to open the bootloader (even offering to buy one on the spot if he did) things escalated rather nastily (see page two of [url=http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228496328]this thread[/url]). A real pity; it's a great board. I still may play with the AVROpendous to see if there's progress to be made there, but it's not nearly as tidy a solution, and as mentioned the Arduino+shield seems to be doing just fine. Of course, if someone wants to try and run it on a teensy and accept the proprietary bootloader, that's OK, but I shall be snooty about it (heh).



Tired, but progress still going. With luck the boards will be here in a week or so and we can see if they work.

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

Re: The ultimate orb solution, at last.

Postby vputz » February 02 2009, 16:43 PM

Oh, and as an addendum:



When folks who build/get their boards get their orbs working... you owe it to yourself to download Google Earth and play. Works like a champ: Tools, Options, Non-Mouse Controller->Enable Controller. Just spent some time flying around a virtual New York City with 3D buildings--fun stuff (although I wish they'd included a sensitivity slider; even at max throw the orb feels a bit slow).

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 02 2009, 21:33 PM

Victor, I did complete the Orbshield yesterday. The only problem I had was one of DB9 support brackets touched one of the top traces and I had to shorten it a bit. Everything checked out great with the multimeter and it looks good. When I attached the Orbshield to the Arduino I did notice the Orbshield can be pushed to far down that the soldered ends of the resistors will contact the Arduino’s USB shorting them out.
[attachment=1]Orbshield Bottom.JPG[/attachment]
[attachment=0]Orbshield Top.JPG[/attachment]

Next I need to reread your post on installing the Arduino and Spaceorb software. Hopefully my Orbshield works!



Ron
Attachments
Orbshield Top.JPG
Orbshield Top.JPG (139.48 KiB) Viewed 7516 times
Orbshield Bottom.JPG
Orbshield Bottom.JPG (130.78 KiB) Viewed 7515 times

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

Re: The ultimate orb solution, at last.

Postby vputz » February 03 2009, 6:24 AM

Looking good, Ron! I'm pretty excited about this. Good point on the resistors and the USB--I'll have to watch for that on the other shields.



If you use the existing download files from the orbduino site, be warned that the "Hidsporb" sketch currently sets it us as a SpaceBall4000, which will NOT translate the orb correctly; you should be able to see what needs to be done (I'm at work, but I think it's just when you create the .... orb_buffer? object, create it with a different initializer; see "orb_buffer.h" if I remember right. Sorry about that--I've been testing with the SpaceBall and forgot to swap back to testing the orb). You will also want to remove the bit about sending an initialization string (the orb doesn't need one). I will make separate sketches for the orb and ball in a future release maybe.



Other things, if it doesn't look like it's working:



1) You will want to unplug it from the Arduino end before plugging in the USB end.

2) When you plug in the USB end, it should give a nice "boo-beep!" and you'll see the devices connect (and in your control panel/joysticks applet you should see the orb)

3) If it goes "boo-boo-boo!", something is wrong with the USB end (you'll know what I mean if it happens).

4) Watch the dip switches. "open/off" is for programming it; "closed/on" is so the orb can transmit. For the spaceorb, you can probably leave pin 1 (that's #2 on your dip) closed.

5) If you want to test the serial comm part, look at the "orb1" sketch; you'll use this with the shield USB port disconnected and the Arduino connected, and use the "serial monitor" part of the Arduino to test the communications coming through. That will at least let you know if the orb is talking and which of the two circuits is the problem.

6) You may want to disable all bindings (in the setup() code) to just test it as a joystick first.



Good luck--tell us how it goes! This is pretty exciting from my point of view; I'm well curious!

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 03 2009, 13:55 PM

Thank you Victor for the information on your new files from your orbduino site. Don’t you think programming the Arduino with your first “hidsporb” (post Jan.11) would be better to check if my Orbshield works? If it doesn’t work I don’t want to troubleshoot the broad and software (I am not good at troubleshooting software) at the same time. I will install the Arduino and Orb software tonight after work. I’ll let you know how it turns out.



Ron

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

Re: The ultimate orb solution, at last.

Postby vputz » February 03 2009, 16:43 PM

Go Ron go! Heh.


[quote]Don’t you think programming the Arduino with your first “hidsporb” (post Jan.11) would be better to check if my Orbshield works?[/quote]

It should work without you having to muck with changing the software; it won't have the keyboard/mouse bindings, but those are merely pleasant additions. It should work fine as a joystick.



Remember--libraries go into your arduino install's "hardware/library" directory (I think?) and sketches in your Arduino documents directory.



Good luck--I can't thank you enough for trying it out!

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 03 2009, 18:20 PM

Ok Victor, I am home and ready to start loading software. I will use your new software so keep your fingers crossed.

The next time you hear from me I’ll be jumping with joy or crying like a two year old. :D



Ron

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 03 2009, 19:10 PM

I have a small problem Victor, the Arduino software doesn’t have a documents directory that I can find. I does have a sketchbook directory with subdirectories default and examples. Could it be the sketchbook “default” directory that the Orb Sketches go in?



Ron

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

Re: The ultimate orb solution, at last.

Postby vputz » February 04 2009, 3:39 AM

Ron--



Sorry to not get back to you quickly (darn time zone difference).



I think by default the Arduino software stores sketches in My Documents\Arduino, which is where the sketches should go (ie "My Documents\Arduino\HidSporb"). That's where it is on my installation. Hopefully that does it.



Good point, though--that may not be obvious. I may try making some "examples" sketches which could go in the base install directory; that way people only install the library in the Arduino software directory and can just go straight to running the Arduino software and choosing an example sketch.

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

Re: The ultimate orb solution, at last.

Postby vputz » February 04 2009, 19:48 PM

(heh--I've been checking back all day hoping for good news from Ron...)



Also, if we put together a guide, starting with an existing Arduino sketch like "blink the LED" or something might get people the idea of uploading and running stuff on the Arduino before jumping into orb stuff. or not. Just a thought.


Return to “Spaceware Software”

Who is online

Users browsing this forum: No registered users and 2 guests