Pages: [1]   Go Down
Author Topic: graphical interface help  (Read 2032 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 157
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

I have a project that needs a gui but i'm at a bit of loss as to what application would: a) play nice with arduino b) be relatively easy to learn

The scope of my project is to create some gauges backgrounds for a stepper motor controlled dial.  Along with that;  I'd also need to have some 'digital' gauges that read analog values from the arduino and be displayed on the screen.  I was thinking of going linux route (raspberry pi or beagleboard black or even android platform) due to it's stability.   I need this to be somewhat high end looking with graphics that i create in photoshop (not just boxy windows looking boxes).  think for in line of a video game gui.  

this is sort of along the lines i want to achieve:


right now i'm leaning toward the unity game engine, or possibly processing.js?
does anyone have any suggestions?  
« Last Edit: August 30, 2013, 05:45:57 pm by scott_fx » Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You might go with just straight Processing (not necessarily processing.js) - the reason why is mainly because it will allow you to do what you want, but also because the Arduino kinda grew out of the Processing mold.

Originally (still is?), Processing was a combination of the software (that you coded), and a piece of hardware that you hooked up to your computer that the software could easily control, to allow you to interface in an easy manner hardware with your computer. These boards connected to the PC via a serial cable, and used a microcontroller (some other AVR variant) which had software on it to interpret instructions from the PC (Processing) and update/set the pins (digital/analog I/O) and return data back to the PC read from the pins.

The founders of the Arduino system saw this, saw how powerful it was and how people loved it and learned quickly with it, and packaged it into what we know as the Arduino - basically a much cheaper and easier to use form of the system (the Processing boards weren't inexpensive, though they were certainly cheaper than some similar options back then).

In fact, the Arduino IDE comes from the Processing IDE - it's a shared lineage; I do know that somewhere out there is a sketch you can load on your Arduino that essentially turns it into a "slave" board for use by Processing. There are also other sketches that allow you to easily send commands and such via serial to do similar things (bitlash, for instance - http://playground.arduino.cc/Code/Bitlash).

...or, you can come up with your own protocol, etc and put more intelligence on the Arduino side, and just communicate with Processing via serial as you would with any other language.

The advantage of using Processing is that it is real similar in syntax and such as what you are used to on the Arduino; it's meant to be an easy way to learn to control the outside world from a computer. Also, like the Arduino software, it is fairly cross-platform (if this means much to you). One downside would likely be that it probably isn't as efficient as a more "standalone" programming language would be (just as the C code for the Arduino isn't either), but that's the tradeoff for portability and ease of use (and really, unless your application is extremely demanding, with today's hardware on a PC, this isn't really something you should worry about, unless you have a very good reason to).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, I envy that you can even imagine to take on such a project.
Can code written in the Processing language be embedded into a webpage?

I would assume the advantage of using processing.js (if its name implies what it means) is it would allow you to create a web-application, the gold-standard in terms of cross-platform and portability.
Not too sure how or if processing.js itself can communicate with the arduino or if node.js or php would allow you to. But I guess you already have a plan for that.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not too sure how or if processing.js itself can communicate with the arduino or if node.js or php would allow you to. But I guess you already have a plan for that.

Well, according to the processing.js reference (http://processingjs.org/reference/), the parts that would potentially allow you access to the serial port (file and/or stream access) aren't implemented yet, but are planned. That's also assuming those pieces would give you that capability.

Apparently, though, someone wrote something (whether and how well it works or how easy it is to get working?):

https://groups.google.com/forum/#!topic/processingjs/Y3-PSD8iR4A  (this link apparently breaks the forum - so cut-n-paste it)

http://www.walking-productions.com/jsserial/new/JSSerial.html

I would also imagine, as you suggest, that "node.js" might also be a route to such access. It might also be possible to use a server-side piece along with web sockets in some manner to get it talking.
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

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

How do you plan to communicate with your GUI and the arduino: USB ?
There are Java solution if you're interested.
Albert
Logged

Pages: [1]   Go Up
Jump to: