Pages: [1]   Go Down
Author Topic: Where to start?  (Read 635 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been using an arduino for a while. Gotten alot of useful javascript experience.
Allthough, to me this is a rather limited language, and I don't really imagine it being a good interface to communicate with an Arduino or microcontroller via pc.

Sure, the Arduino could run Javascript, but I don't want to have to be running "Processing" (as I have so faar) or similar to get some sort of input/output option.

So I aquired Visual Studio. Unfortunately, I don't know where to start.
Is Visual C a good language to learn for this? And if so, where do I start with this?
Logged

0
Offline Offline
Shannon Member
****
Karma: 132
Posts: 10497
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

c or c++ is better (more used), but don't bother yourself with it if you need a GUI.
also wiring is based upon this 2 languages, so it will improve your skill with arduino
Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

Victoria, BC, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 222
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Many of the examples for the Arduino are C, and you can code and use them directly from their tools (no Visual C needed). So if you wanted the greatest range of informaiton, C would probably be the best route.
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to use Visual studio to program applicatuins on the PC to communicate with Arduin, i would recommend c# (or VB.NET)
Most people use these two languages.

Doing serial communication with .net is relatively easy.

There are many examples in this forum and other places on the net, just google Arduino and c#
Logged

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

Ok, so if I use C, where do I start with this?

What I need is basically a GUI for my Arduino. Though, I don't want to rely on others, so I need to make this myself.

I've been using processing, but this turns out stupid, cuz it runs ok as long as I'm running it in the processing program, but if I attempt to open the java file I've made directly, It will open in my browser and be all fucked up. (Meaning indicators mostly doesn't work)

Logged

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

Quote
What I need is basically a GUI for my Arduino.
What, on the Arduino, are you going to display the GUI on?

If you are building an application with a GUI on the PC to interface with the Arduino, then C# is much easier to use.

Have you looked in the Playground? There is a link on every page on the forum (at the top). There, there are links to interfacing with many languages.
Logged

0
Offline Offline
Shannon Member
****
Karma: 132
Posts: 10497
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so if I use C, where do I start with this?

What I need is basically a GUI for my Arduino. Though, I don't want to rely on others, so I need to make this myself.

I've been using processing, but this turns out stupid, cuz it runs ok as long as I'm running it in the processing program, but if I attempt to open the java file I've made directly, It will open in my browser and be all fucked up. (Meaning indicators mostly doesn't work)



you can't open the java file directly. first of all a java file is lice a c file, just code. You need to compile it and then you have .class file. Now you can run it doing "java MainClassName" form terminal. Then you can put all file in a jar (processing can do this automagically), and if you open this .jar with java -jar JarName it will run exactly as a .exe .

actually java and processing (processing is not java, but a layer over it) are easy in GUI and use standard library in the API. never work with c# or .NET, but i don't think their GUI are portable over different system..
Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

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

This is great news!
Thanks!

I've actually just aquired an ethernet shield for my arduino, so now I'm going to start making a GUI for communication over ethernet.
( I've previously made one for communicating over ethernet and through USB) :

Arduino - <USB> - PC #1 - <Ethernet connection> - PC #2
Though, this GUI basically sucked as it was Javascript and I didn't know then what you told me now.

Now I intend to just run

Ardunio - <Ethernet connection> - PC

and in the long run:

Arduino - <Ethernet connection > - Internet router - <Internet> - Internet router - <Ethernet connection> - PC
Logged

0
Offline Offline
Shannon Member
****
Karma: 132
Posts: 10497
:(){:|:&};:
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

javascript IS NOT java.

Code:
Now I intend to just run

Ardunio - <Ethernet connection> - PC

you want to use Socket. in java are easy, i don't think processing has it.


Code:
and in the long run:

Arduino - <Ethernet connection > - Internet router - <Internet> - Internet router - <Ethernet connection> - PC
that's just the same code above and some setting in the routers if they use NAT or firewall (on the server side).
Logged

sei nuovo? non sai da dove partire? leggi qui: http://playground.arduino.cc/Italiano/Newbie

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

I'm aware that Javascript is NOT Java.
That being said:

I've already done a test with a Arduino -> (USB) -> PC -> Ethernet -> PC.
This worked out OK, but the GUI sucked ass cuz on PC#2 I run it through a browser.

Now I intend to do a more advanced test.
I know about the IP and Firewall issues, I'm not completely green with this, I'm gonna use NAT to route some ports to a specified IP on an internal network on both sides. Also make a firewall exception if needed.

Though, what I'd really want (and haven't tried yet) is to have the target IP resolved by DNS.
Thereby having the host PC connect with some opendns, so I can autoresolve IP adress from the client.
But this is further down the road.
Logged

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

If you are concerned about real-time processing and memory management.  C is going to be better than C++ because you don't have the overhead of "processing" all the Object Oriented "stuff".
Logged

Pages: [1]   Go Up
Jump to: