Pages: [1]   Go Down
Author Topic: Arduino and Visual Studio  (Read 1534 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone, this is my very first post.
I want to buy an Arduino this week but first I want to clarify some things, because I already have a project in mind.
I need to create an application, let's say in Visual C++, or any other programming language in order to control Arduino. The most important thing is that I need it to be graphical, I need the application to be a window with, let's say, 3 buttons drawn in it, and every time I click the button the correct LED to light on the board. Is it generally possible to do this? I searched a lot and never got a clear answer, I've seen people even use PHP to get the Arduino working, but I want more info on how it's done.

Thank you smiley-wink
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would think that you need to build a sketch with the arduino IDE (looks like its based on processing) and then have the arduino look for serial data to control which pins to switch and how.

then just code something in Visual C++ to send these commands to it with the com ports. I tried something like this before with Visual BASIC but couldnt get it to work right.  I think it was a hardware issue with my PC (either that or I just couldnt figure it out lol)
Logged

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

Thanks for the quick reply, at least now I know it's possible smiley
Do you know of any examples, something I could get started with? Maybe a source code or smth...
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8430
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Personally I would use VB for this (I don't have directly applicable VB code but if you decide to use VB can post something to get you started), however from what I've seen "Procesing" may be a perfect match for what you want to do.

Bottom line is that this is well doable, so go ahead and buy your hardware.

______
Rob
« Last Edit: February 19, 2011, 09:21:25 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

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

Depending on which version of Visual Studio you have, it may or may not include C# capabilities. If it does, it is incredibly easy to design forms in C#. C# also makes it very easy to read from/write to the serial port, which is what you need to do in order to communicate with the Arduino.
Logged

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

Thanks a lot guys for your fast responses smiley-wink I'm going to buy the Arduino tomorrow.
I've done some researching and I have some more questions:
1. I still don't understand if I can make apps with graphical interface with processing, like having buttons and such, is it possible?
2. I read about this protocol called firmata, do I need it to control the Arduino in real-time?
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't find it right off hand but I can tell you I have done exactly what you are looking to do, and it's not hard at all.
Logged

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

Would you like to share with a source code or smth? I just want to see an example smiley
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh sure! But see... That's the problem. I am at work away from my computer, but it was an example I got online somewhere. I think it was about a year ago.

Here you go:
http://arduino.cc/en/Tutorial/PhysicalPixel

Here's more
http://drewish.com/content/2009/06/simple_arduino_serial_communications

This code shows how you can type text into a line and it will send it to the arduino, and then the arduino will send it back and it will paste what you sent it into a line below. Same concept, just that instead of a button, it's text.
I am not putting the code here since it's a personal deal from another site.

On another note.. Anyone else seen this?!
"Poorman's oscilloscope with arduino and processing"
http://accrochages.drone.ws/en/node/90
« Last Edit: February 20, 2011, 06:18:00 pm by hexskrew » Logged

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

I have a C# application that communicates with the Arduino. If you are interested, PM me with an e-mail address.
Logged

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

Again, thanks a lot guys, you're really helping me out smiley
If you'll have any other contributions I'll be glad to see them smiley-wink
Cheers!
Logged

Pages: [1]   Go Up
Jump to: