Pages: [1]   Go Down
Author Topic: Carnivore affecting brightness of LED  (Read 311 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Pages: [1]   Go Up
Jump to: