Entries with tag "gnu/linux"

Real-time Linux for time critical tasks

My Tepozchiquilichtli pieces so far have required a time resolution of 1 millisecond (1 millisecond is the tatum of the pieces). Controlling the timing of the pieces using the Python time.sleep( ) function from within my general purpose computer (Intel Core Duo CPU T2250 @ 1.73GHz, cpu MHz: 800.000, cache: 2048 KB) running plain vanilla Linux proved useless. The function is unable to sleep for less than 4 milliseconds and the inaccuracy is too high.

One way around this problem is to have a dedicated micro-controller do the timing and have it send all the data to the printers. This works great and has the advantages of compactness (there are other issues with this solution, but accurate timing is not one of them). I still wanted to find a way to get the accuracy I need from a general purpose computer because this is more convenient for testing and prototyping.

Enter Real-time Linux and powernap. powernap is a Python module that uses the real-time clock (dev/rtc) to do the timing. With powernap and RT Linux I can get the accuracy of 1 millisecond I need with variances of about 0.002 milliseconds.

The powernap website point to this real-time module, but since there's no documentation for it, I decided to go with the Linux kernel and the CONFIG_PREEMPT_RT Patch instead. Here are instructions to compile the Linux kernel in Debian, and here are general instructions for patching the source for real-time capabilities.

Posted on:
2009.09.04 -0500

Tags:
code , gnu/linux , music , Tepozchiquilichtli

Terminal bell OFF

Tired of hearing that annoying beep in the terminal?

If using xterm: Open the ~/.xsession file and append the following line
xset b off
If using bash: Open you ~/.inputrc file and append the following line:
set bell-style none
or to get a visible signal:
set bell-style visible

If you use VIM: Open vim config file ~/.vimrc and append the following line:

set vb

Posted on:
2008.07.26 -0500

Tags:
gnu/linux

auto run svnserve at startup on linux

$ cd /etc/init.d/ 
$ sudo vim svnserve
svnserve -d -r /usr/local/svn/repository_name
after saving the script in /etc/init.d/
$ sudo chmod +x svnserve
Finally add the script to the boot sequence:
$ sudo update-rc.d svnserve defaults

Posted on:
2008.01.09 -0600

Tags:
gnu/linux