Door Monster

Nikolaus Gradwohl2009-02-05T04:52:00+01:00

A while ago, a hook on our bathroom door fell down. First we thought it was because of some loose screws. but today i found out the real reason - there was a monster lurking behind it!

doormonster

read more ...

i2c thermometer on arduino

Nikolaus Gradwohl2009-02-02T05:07:00+01:00

I have hooked up my c-control i2c thermometer-module (link in german) to my arduino and wrote some code to read the current temperature in Celcius.

The module uses the maxim DS1631 chip.

The temperature is send as a 2 byte value using a 12 bit resolution. in the MSB the first bit is used as a sign bit, the other seven bits are represent the part before the comma, in the LSB the first 4 bits are used as the fractional part.

the code below doesn't handle negative values yet. i want to use it in my livingroom - i never ever want it to deal with negative values!

i2c-thermometer

read more ...

Soup Monster

Nikolaus Gradwohl2009-01-31T18:48:00+01:00

a college of mine found another monster when she tried to eat her soup

soupmonster

read more ...

extra low framerates in Processing

Nikolaus Gradwohl2009-01-29T04:45:00+01:00

when you want to write a processing sketch, that doesn't redraw several times a second, but updates the main method only once in a while (for example once per hour or minute) the following code can be used to start a thread that triggers a redraw after a delay. Just make sure the setup method calls the noLoop() methode and than start the thread calling start( millisecondsToWait );

void setup() {
  size(300,300);
  smooth();
  noLoop(); // <- turn off the processing loop

  start( 20 * 1000 ); // <- start the thread
}

void draw() {
  background( 255 );
  // draw some random circles
  for ( int i =0; i< 10; i++) {
    color c = color(random( 255 ));
    fill( c );
    stroke( c );
    int radius = int(random( 100 )+ 40);
    ellipse( random( width ), random( height ), radius, radius );     
  }  
}

void start( final int mil ) { //<- mil has to be final to be accessible in run() 
   new Thread() { 
   public void run() {
     while( true ) {     
        delay( mil );
        redraw(); 
      }
   }
 }.start();
}
read more ...

Ruby Caldav Library 0.2

Nikolaus Gradwohl2009-01-28T04:16:00+01:00

I have made a new version of my ruby caldav lib.

version 0.2 is a bugfix release, there are no new features but i removed some essential typos

read more ...

login screen background

Nikolaus Gradwohl2009-01-26T05:25:00+01:00

i just cleand up my harddisk a bit and found a background image i made a while ago for the login screen on my laptop

<typo:lightbox src="/img/guru/palmlogin.png" thumbsrc="/img/guru/palmlogin_prev.png"/>

read more ...

Nagios-Frontend in SL-viewer

Nikolaus Gradwohl2009-01-25T15:53:00+01:00

i wanted to test the region modules in OpenSimulator - a opensource server implementing the SecondLife protocol.

Because I didn't want to write another "hello world"-region module, i took my nagios-server as a datasource for my module.

now i can see the status of all the services my nagios is monitoring using a SL-Viewer :-)

the code is based on the demo-region from the opensim team and can be downloaded here.

nagios region 1

read more ...

qr-code midlet installer

Nikolaus Gradwohl2009-01-25T14:26:00+01:00

to simplify the installation of my mobileprocessing-sketch i have generated a qrcode-tag that downloads the jad file and installs the midlet on the mobile phone.

simply point a qrcode reader like the one from zxing to the image and click on download

qrcode-random-installer

read more ...

Random numbers with MobileProcessing

Nikolaus Gradwohl2009-01-25T08:14:00+01:00

I wrote my first sketch in MobileProcessing. MobileProcessing is a processing dialect, that can be used to write apps for java-capable mobile phones.

The application can be used to generate random numbers. every key-event shows a new random number.

/**
  a random number generator by
  <a href="http://www.local-guru.net/blog">Guru</a>
*/

PFont font;
int rnd = 0;

void setup() {  
  font = loadFont( FACE_PROPORTIONAL, STYLE_PLAIN, SIZE_LARGE );
  textFont( font );
  textAlign( CENTER );
  fill(0);
  rnd = random(0,100000);
  noLoop();
}

void draw() {
  background(255);
  text( "\n\n\n"+rnd, 0, 0, width, height );
}

void keyPressed() {
  rnd = random(0,100000);
  redraw();
}
read more ...

the first snowdrop

Nikolaus Gradwohl2009-01-24T19:15:00+01:00

today i made a picture of the first snowdrop this year. the picture was shot with my new mobile phone (K550i - has a realy nice 2 megapixel cam with autofocus)

snowdrop

read more ...