Tutorial of Blinking LED Using Java


Following the example from:


Could anyone please provide a working tutorial on how to make an LED on the Arduino blink using Java?

Please also provide both Java + Arduino codes if applicable?

I'm asking this as a total Arduino newbie, but I'm sure it will benefit a lot of people new to Arduino too, who wants to control it using Java.

The aim is to be able to send data to Arduino, and receive data from Arduino, extending from the example provided in the URL above.

Thank you very much in advance to anyone kind enough to provide a positive answer to my post.

Thank you.

Have you successfully use the code on that page to send data from the Arduino to Java? That would be the first step.

Yes, I I think have made that example work successfully. However, I don't really know what it accomplished?

Did it sent data from the Arduino to the Java? How do I tell?

Sorry, I'm a total newbie, and I've tried to find a tutorial on Arduino using Java, to no avail.

Hope you can help clear things up for me? Specifically, how do I (using Java):

  1. Send data from my PC to Arduino to light up the LED?

  2. Receive data from the Arduino into my PC?

Any code example/tutorial would be awesome.

Thanks once again for your help.

How much Java do you know? What environment are you using to write the Java? I'd suggest trying Processing (www.processing.org), as it comes with a few examples that include both the Processing (Java) and Arduino (C++) ends of the code.

My core Java skill is about intermediate. I use NetBeans IDE. But as far as Arduino is concerned, I know very little.

I would like to explore working with Arduino using only pure Java and a "Blink LED Tutorial Using Pure Java" would be a great start, don't you think?

Ultimately the aim is to be able to use the PC/Mac to communicate with the Arduino using only Java and not other derivative language such as Processing.

Could anyone help?

Thanks very much.