gobetwino and open office - samples fail for me

HI.
I am asking if anyone has had success in getting gobetwino and arduino to talk to an open office document. Open office is registered as the program to handle .xls files on my windows 7 system.

When I use the supplied example (gobetwinoXLtest), gobetwino opens up the file gtest.xls, as it should. It writes two data points to it, and then dies.
I wonder if ooo does something horrible like changes its PID (or windows equivalent) after it has started. This is suggested by the output: Process: 0 ended and was removed from the runningProcessList
OOO however has not died - I can type stuff into the spreadsheet and do what I like with it. grumble, grumble, grumble!

Any ideas around this, other than going out and buying myself a copy of MS Orifice? !!

Thanks for your time.

Here is the ouptput and details:

22/01/2011 6:37:56 PM Commandstring recieved : #S|SPXL|[]#
22/01/2011 6:37:56 PM Command parsed OK
22/01/2011 6:37:56 PM Executing command : SPXL
22/01/2011 6:37:56 PM Process : C:\Program Files\OpenOffice.org 3\program\scalc.exe started. Proces ID = 0
22/01/2011 6:37:56 PM Commandstring recieved : #S|SENDK|[0&413 {TAB} 343 {DOWN} {LEFT} ]#
22/01/2011 6:37:56 PM Command parsed OK
22/01/2011 6:37:56 PM Executing command : SENDK
22/01/2011 6:37:58 PM Sending keys to process 0 Succeded
22/01/2011 6:37:58 PM Process: 0 ended and was removed from the runningProcessList

Hi,

Not exactly success. I found Gobetwino to be very flaky. Sometimes it would work, and sometimes it wouldn't, with no changes to the Arduino sketch. Same problem as you, process ended and removed from list.
When it was working it was very.....very.....slow.
I wanted to read 850 single integer values into OO Calc. At about one value every five seconds it would have taken over an hour!

You can only use GoBetwino's sample code with open office if Open Office use the same menu shortcut keys as Excell.

From your symptoms i think it does not, so you will have to change the sample code to send the correct data to OO.

Hi MikMo,
that is possible.

The interesting thing is that it produces 1 row of data, places the cursor on the next row and then dies (and only one number in each cell, so it is not the case that the data is getting through and just going into one cell),
so it is failing to do more than 1 iteration of the for loop below:

That makes me think that something is going wrong with readSerialString(serInString, 1000); from the gobetwino,
which makes me think that gobetwino and open office don't talk to each other in the same way that excel and gobetwino do!

Anyway, I got what I needed by just logging it as a csv file and then cleaning it up by hand - I was recording waves on a beach, and in the end it worked ok. Real time would be more spectacular though!

Cheers,
Leon

void sendPotValues()
{
char buffer[5];
int potValue1;
int potValue2;

for (int i=1; i<=15; i++){
//Read the two pot values - could be any sensor value or whatever
potValue1=analogRead(1);
potValue2=analogRead(2);

//Send the values as though it was typed into Excell, using the SENDK command
// This is the total line that is send: #S,SENDK,[pId; potValue1 {TAB} potValue2 {DOWN} {LEFT} ]#
Serial.print("#S|SENDK|[");
Serial.print(itoa((pId), buffer, 10));
Serial.print("&");
Serial.print(itoa((potValue1), buffer, 10));
Serial.print(" {TAB} ");
Serial.print(itoa((potValue2), buffer, 10));
Serial.print(" {DOWN} ");
Serial.print(" {LEFT} ");
Serial.println("]#");
// wait up to 1000 ms for answer from Gobetwino, answer will be in serInString, answer is 0 if all is OK
readSerialString(serInString, 1000);
//Deal with answer here - omitted in this example
delay(2000);
}

Rereading your first post, i see the problem.

It's very strange that GoBetwino tells you that your OO program has ended. If you started your OO program with a SPRID command type in GoBetwino it should not close after each "insert" with the Send keys command.

Unfortunately most of my stuff is in temporary storeage, while i'm looking for a new home, so i have very little to test with.

Are you using the full XL sample ?

Did you put the SPRID command in your Arduino Setup() where it should be ?

Because as far as i remember in the Arduino sample code i send some data to Excell, then close Excell and email the excell sheet ?

Could that be the problem ?

Which Windows version are you using ?

Also it should be possible to send data much faster than once every 5 seconds, but if the OO program is restarted every time then the speed slows down of course.

While testing GoBetwino i inserted integers in 3 cells, read with Analogread() from 3 potentiometers, and was able to do that serveral times a second, and it could probably have run faster.

That said, the way GoBewtino does this was never meant to run at rocket speed. After all you send your data over serial, each command has to be parsed by GoBetwino and the recieving program (Excell / OO) has to be put in the foreground, and first then are the data inserted.