neilk gave me the idea of logging greenhouse temperature data into a spreadsheet, so I did a little more investigating into how this would work with Gobetwino. I have a little greenhouse not too far from the house, so I thought this might be a neat thing to try with the use of a wireless connection - maybe Bluetooth or using those inexpensive nrf24l01 cards.
I'm using WindowsXP and openOffice.org 3.3.0. It shouldn't make a difference, but this is all within a VirtualBox VM on a Mac.
As it turns out, the basics are not too difficult: I was able to fill in data and navigate fields, but I wasn't able to get it to insert a timestamp into a field.
I've attached the sketch to do this. On the Gobetwino side you will need to set up a new Command with the name "OPENOFFICE" and the path "C:\Program Files\OpenOffice.org 3\program\scalc.exe" (do not enter the quote marks for either case).
As you can see, this sketch does nothing more than test the possibility of data logging using Gobetwino - I haven't done any data sampling or wireless communications yet.
I did also try it on a Vista machine, but Gobetwino reports the application closing, which then means it refuses to talk to it after that.
Thanks for the inspiration, Neil!
Cheers,
-Nico
In easy text, this is what the series of commands looks like:
void setup()
{
Serial.begin(9600);
//Serial.println("#S|NOTEPAD|[]#");
Serial.println("#S|OPENOFFICE|[]#");
//delay(10000); // wait for OO to start up
Serial.read(); // gobetwino returns the processID when it has started up.
// set up the header line
Serial.println("#S|SENDK|[0&Time]#"); // column 1 = timestamp
Serial.println("#S|SENDK|[0&{tab}]#"); // tab to go to next column
Serial.println("#S|SENDK|[0&Greenhouse Temp]#"); // column 2 = inside temp
Serial.println("#S|SENDK|[0&{tab}]#"); // tab to go to next column
Serial.println("#S|SENDK|[0&Outside Temp]#"); // column 3 = outside temp
Serial.println("#S|SENDK|[0&{enter}]#"); // enter to go to next line
Serial.println("#S|SENDK|[0&3:45am]#"); // fake a time
Serial.println("#S|T|[]#"); // time stamp
Serial.println("#S|SENDK|[0&{tab}]#"); // tab to go to next column
Serial.println("#S|SENDK|[0&10.0 C]#"); // fake a temperature
Serial.println("#S|SENDK|[0&{tab}]#"); // tab to go to next column
Serial.println("#S|SENDK|[0&2.5 C]#"); // fake a temperature
Serial.println("#S|SENDK|[0&{enter}]#"); // enter to go to next line
}
Top Comments