Hi,
I'm using Ubuntu and have following problem:
I want to use Processing in Eclipse while programing something on my Arduino Duemilanove.
I already configured Eclipse successfully to use my Arduino and the upload is working fine,too.
I also installed the Processing plug in and something simple like creating an ellipse is working fine.
But I don't know how to combine those two. I'd like to make a code in which I press a button which lights an LED and there shall be a window on my screen which shows me which LED is lighted. The Code for the Arduino is the following one:
#include <WProgram.h>
const int button1 = 2;
const int button2 = 7;
const int button3 = 4;
int state = LOW;
int press1 = 0;
int press2 = 0;
int press3 = 0;
void setup () {
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);
}
void loop () {
press1 = digitalRead(button1);
press2 = digitalRead(button2);
press3 = digitalRead(button3);
if (press1 == 1)
{ state = !state;
digitalWrite(6, state);
}
if (press2 == 1)
{ state = !state;
digitalWrite(5, state);
}
if (press3 == 1)
{ digitalWrite(5, LOW);
digitalWrite(6, LOW);
}
delay (400);
}
int main(void)
{
init ();
setup();
for(;;)
loop() ;
}
How can I integrate Processing and Arduino in Eclipse? I've already googled but with no success.
Thanks for your answers.
Best Regards,
HammerH