Pages: [1]   Go Down
Author Topic: Java Application with Arduino  (Read 247 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys, I'm new to arduino and I made some basic sketches that I learned from tutorials and stuff. One of them is that an led is turned on when the letter f is pressed and switched off when it is pressed again. I wanted to make an application with gui so that there will be two buttons on and off to turn on and off the led with arduino. The problem is that I don't know how to combine the java application with the arduino sketch. Thanks in advance for your help smiley smiley
« Last Edit: August 26, 2013, 04:39:26 am by jusspit » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The problem is that I don't know how to combine the java application with the arduino sketch.
You don't. The java application needs to talk to the serial port that the Arduino listens to. There are examples on the Playground, under interfacing with software, for many languages in addition to Java.
Logged

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

Thank You for your reply
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 266
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You might  want to try this open source GUI
http://forum.arduino.cc/index.php?topic=182442
https://github.com/selfonlypath/Arduino-ElectroShaman

The true power of this GUI:
- there is a part which runs on Windows or Mac - this part is called the GUI
- there is part which runs on the Arduino (Mega, DUE, ...) - and is part of the sketch
- between the GUI and the sketch, there is USB communication (the standard one used by Arduino), and a proper protocol for exchanging data

In the Arduino sketch, you define what parameters you would like to use in teh GUI:
   - there are 12 sliders on which you can set the min, max and default values
   - in addition there are 8 checkbox controls
   - lastly there is a console text section
Once you start your GUI, you get a default screen.
Upon establishing the connection the Arduino (is just selecting the right serial port), the setup parameters are exchanged.
From then onwards, you can adjust all your desired Arduino parameters LIVE from your GUI!

As an example, you can life-update the PWM frequency, or duty-cycle of any timer (you just program in the sketch what you want to get).
Same with the 8 checkbox. This acts like an on/off switch, where you can command just anything to your Arduino.
The console section, is to receive text messages from your Arduino, as you have programmed it in your sketch.
Suppose you have a system programmed with a PLL, you could send a message to the GUI telling the "PLL is locked".
Use your imagination!!

It's a very flexible thing, instead of juggling around with adjusting the parameters in your sketch, reprogram and reload, you just do it live from the GUI.

Albert
Logged

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

Thank You very much I will try this out
Logged

Pages: [1]   Go Up
Jump to: