My first version was written in C, not because I'm comfortable with C -- in fact this Arduino stuff is my first full-blown C or C++ programming, but rather because the datatypes on the Arduino are all defined in C terms and I thought it would be easier to get that right in C. However, I soon found that it was nearly impossible to write serial code that could work on multiple platforms, Win32 being particularly difficult.
Since I've been enjoying programming in Ruby lately, I decided to see what could be done on that platform. As it turns out, the careful datatyping can be done with Ruby's Array.pack() command, and with some difficulty, I was able to get a cross-platform serial port library working for me on Windows. Finally, I used wxruby to start a GUI for the program. But the last, and crucial, step was to see if I could make an all-in-one executable, especially for Windows, out of all this.
Enter OCRA, the one-click ruby application builder. I was really impressed with this.
gem install ocra, then
ocra ruby_file.rband you have an application. The
--consoleswitch will force a console application; and the
--windowswitch will make it a GUI. One caveat: if you make a window application, comment out any
putsor other statements that print to the command line. If you don't your program will exit unceremoniously.
If you'd like to try them out, you'll find them at my public DropBox folder. The commandline version should actually send bytes up your serial port, and will play nicely with, the corresponding Arduion example code. The GUI version just emulates the satellite chosing window in SatPC32 and provides some menu items to specify TLE, modeline and subtone files.