Go Down

Topic: Carnivore affecting brightness of LED (Read 499 times) previous topic - next topic


Hi I am at a very amateur level.
But I really want to get carnivore client in processing to affect the brightness of LED's.

In an exact way to that of the 'dimmer' example that comes with the Arduino board.

This example is affected by mouse x which delivers a number between 0 and 255 to the arduino
to affect the brightness of the LED.

An example that I have found on the processing side that will scale the parts of an IP address to a number between
0 and 255 is this:

  // Use last two IP address bytes for x/y coords
   splitter = ip.lastIndexOf(".");
   y = int(ip.substring(splitter + 1)) * height / 255; // Scale to applet size
   String tmp = ip.substring(0, splitter);
   splitter = tmp.lastIndexOf(".");
   x = int(tmp.substring(splitter + 1)) * width / 255; // Scale to applet size

However, I would ideally like to affect multiple LED's.

However, I think for this post it's porbably best to just get the carnivore packet input
affecting an LED.

Thankyou and sorry for the basic level post.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131