Pages: [1]   Go Down
Author Topic: Newbie Question: Eclipse and Processing  (Read 684 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:


Code:
#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
« Last Edit: March 03, 2011, 10:52:29 am by HammerH » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, after no one answers, let me put the question in another way.

Is it possible, that I can program with Eclipse and upload it to the Android by using the Processing Plug-In?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 30
Arduino rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
 you'd proceed as follow.
You need two programs.
A first program uploaded to the arduino, which will send messages (for instance a temperature value) to the serial usb.
A second program which will run on the Pc, written in processing, to read that values and do a graph.
Arduino comes with some basic examples for communicating with Processing (in Arduino IDE, look at menu Examples > Communication).

A total different option is to drive Arduino via Processing, look at
http://www.arduino.cc/playground/Interfacing/Processing

But as far as I know, Processing uses Java, and arduino uses C++, so the two languages are a bit different.
« Last Edit: March 06, 2011, 02:40:34 am by daitangio » Logged

Pages: [1]   Go Up
Jump to: