From: Petter Reinholdtsen Date: Wed, 1 Sep 2010 20:15:14 +0000 (+0000) Subject: Generated. X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/commitdiff_plain/1d439d798c53d670f8964f85c52240444a7db140 Generated. --- diff --git a/blog/archive/2010/09/09.rss b/blog/archive/2010/09/09.rss new file mode 100644 index 0000000000..370a24e26a --- /dev/null +++ b/blog/archive/2010/09/09.rss @@ -0,0 +1,67 @@ + + + + Petter Reinholdtsen - Entries from September 2010 + Entries from September 2010 + http://people.skolelinux.org/pere/blog/ + + + + My first perl GUI application - controlling a Spykee robot + http://people.skolelinux.org/pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html + http://people.skolelinux.org/pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html + Wed, 1 Sep 2010 21:00:00 +0200 + +<p>This evening I made my first Perl GUI application. The last few +days I have worked on a Perl module for controlling my recently +aquired Spykee robots, and the module is now getting complete enought +that it is possible to use it to control the robot driving at least. +It was now time to figure out how to use it to create some GUI to +allow me to drive the robot around. I picked PerlQt as I have had +positive experiences with the Qt API before, and spent a few minutes +browsing the web for examples. Using Qt Designer seemed like a short +cut, so I ended up writing the perl GUI using Qt Designer and +compiling it into a perl program using the puic program from +libqt-perl. Nothing fancy yet, but it got buttons to connect and +drive around.</p> + +<p>The perl module I have written provide a object oriented API for +controlling the robot. Here is an small example on how to use it:</p> + +<p><pre> +use Spykee; +Spykee::discover(sub {$robot{$_[0]} = $_[1]}); +my $host = (keys %robot)[0]; +my $spykee = Spykee->new(); +$spykee->contact($host, "admin", "admin"); +$spykee->left(); +sleep 2; +$spykee->right(); +sleep 2; +$spykee->forward(); +sleep 2; +$spykee->back(); +sleep 2; +$spykee->stop(); +</pre></p> + +<p>Thanks to the release of the source of the robot firmware, I could +peek into the implementation at the other end to figure out how to +implement the protocol used by the robot. I've implemented several of +the commands the robot understand, but is still missing the camera +support to make it possible to control the robot from remote. First I +want to implement support for uploading new firmware and configuring +the wireless network, to make it possible to bootstrap a Spykee robot +without the producers Windows and MacOSX software (I only have Linux, +so I had to ask a friend to come over to get the robot testing +going. :).</p> + +<p>Will release the source to the public soon, but need to figure out +where to make it available first. I will add a link to +<a href="http://wiki.nuug.no/grupper/robot/">the NUUG wiki</a> for +those that want to check back later to find it.</p> + + + + + diff --git a/blog/archive/2010/09/index.html b/blog/archive/2010/09/index.html new file mode 100644 index 0000000000..d7f4b4da53 --- /dev/null +++ b/blog/archive/2010/09/index.html @@ -0,0 +1,230 @@ + + + + Petter Reinholdtsen: entries from September 2010 + + + + + + +
+

+ Petter Reinholdtsen + +

+ +
+ +

Entries from September 2010.

+ + +
+ +
+ 2010-09-01 21:00 +
+ +
+ +

This evening I made my first Perl GUI application. The last few +days I have worked on a Perl module for controlling my recently +aquired Spykee robots, and the module is now getting complete enought +that it is possible to use it to control the robot driving at least. +It was now time to figure out how to use it to create some GUI to +allow me to drive the robot around. I picked PerlQt as I have had +positive experiences with the Qt API before, and spent a few minutes +browsing the web for examples. Using Qt Designer seemed like a short +cut, so I ended up writing the perl GUI using Qt Designer and +compiling it into a perl program using the puic program from +libqt-perl. Nothing fancy yet, but it got buttons to connect and +drive around.

+ +

The perl module I have written provide a object oriented API for +controlling the robot. Here is an small example on how to use it:

+ +

+use Spykee;
+Spykee::discover(sub {$robot{$_[0]} = $_[1]});
+my $host = (keys %robot)[0];
+my $spykee = Spykee->new();
+$spykee->contact($host, "admin", "admin");
+$spykee->left();
+sleep 2;
+$spykee->right();
+sleep 2;
+$spykee->forward();
+sleep 2;
+$spykee->back();
+sleep 2;
+$spykee->stop();
+

+ +

Thanks to the release of the source of the robot firmware, I could +peek into the implementation at the other end to figure out how to +implement the protocol used by the robot. I've implemented several of +the commands the robot understand, but is still missing the camera +support to make it possible to control the robot from remote. First I +want to implement support for uploading new firmware and configuring +the wireless network, to make it possible to bootstrap a Spykee robot +without the producers Windows and MacOSX software (I only have Linux, +so I had to ask a friend to come over to get the robot testing +going. :).

+ +

Will release the source to the public soon, but need to figure out +where to make it available first. I will add a link to +the NUUG wiki for +those that want to check back later to find it.

+ +
+
+ + + + Tags: english, nuug, robot. + +
+
+
+ +

RSS Feed

+ + + + + +