Dec 21, 2007

Linux electronic Whiteboard

After seeing this I decided to try it in GNU/Linux. After some time of no sleeping, I suceeded.

It's very basic, a bit buggy, but It works.

If you are a gentoo user, check this howto, written by stone.

If using Ubuntu 7.10 (gutsy gibbon):
  • First, make sure bluetooth is working
  • Download the program
  • Extract the file "demo" (no need for a configuration file now)
  • sudo apt-get install lswm libcwiid0 libsdl1.2debian libxext6 libxtst6
  • sudo ln -s /usr/lib/ /usr/lib/
  • Now we are ready to execute it: ./demo
  • Put the wiimote in discovery mode (press 1+2)
  • If the computer cannot connect with the wiimote, you can try to pass the wiimote address as the first argument: "./demo thewiimoteaddress". To obtain this address, execute "lswm", as you press 1+2 in the wiimote.
  • When the wiimote is connected, you should see four crosses and small rectangle at the center of the screen
  • Point the wiimote to the screen, and start moving your IR pen.
  • The position of the IR pen will show in the little square at the center of the screen. You can use it to adjust the wiimote so the distance between the points at the corners is maximized.
  • With the IR pen, click at the crosses, in this order: top-left, top-right, bottom-left, bottom-right.
  • After each click on the each cross, you have to press spacebar (you will notice that the cross you have to click is blinking)
  • When you press the spacebar the fourth time, the IR pen and the mouse pointer will be in sync. You can start to use your electronic whiteboard
  • To exit, press any wiimote's key.
If that version does not work for you, you can try earlier releases here.

If you want to compile it yourself, check the project in google code (go to the source tab if you want to browse the code).

UPDATE: I opened another branch in the project, with experimental code from vahtu1987 (a great contributor to the project). Here, check the svn/branches/cpp folder.

If you have subversion installed on your system (sudo apt-get install subversion), you can get a working copy just typing:

$ svn checkout linux-whiteboard-read-only

You need to install some development libraries:

$ sudo apt-get install libcwiid0-dev libsdl1.2-dev libxext-dev libbluetooth-dev

Maybe you will need to make a link for the libXTst library:

$ sudo ln -s /usr/lib/ /usr/lib/

If you can't get it working, post a comment. I will try to help you!!

GOOD LUCK, and happy hacking (linus dixit).

Dec 9, 2007


Perl has to be the most beautiful language that a computer can speak. Well, we all know that the computer speak in binary, really. Perl is a reasonable man-machine interface. I teach it to my students because it is powerful. It's a tool that let you do great things with computers.

I have used some computer languages: Basic, Pascal, C, C++, ADA... I liked C (i still use it), but the others... uff... they have serious flaws (there is no "perfect language")... all languages have pitfalls. I like C because it trusts the programmer, it let you do crazy things (take a integer and treat like a char or a string...). C++ and JAVA in the other hand, impose a developing model too strict. Specifically, they obligue us to use Objects. I think Object-Oriented languages are fine, and the OO metodology has its points, but I don't like to be obligated to think in some way. There are many situations that Objects are fine for, as there are many other situations that Objects feel ankward.