Go Down

Topic: Arduino and Visual Studio (Read 2025 times) previous topic - next topic

LastTemplar

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 ;)

Metalfan1185

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)

LastTemplar

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

Graynomad

#3
Feb 20, 2011, 03:19 am Last Edit: Feb 20, 2011, 03:21 am by Graynomad Reason: 1
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
Rob Gray aka the GRAYnomad www.robgray.com

PaulS

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.

LastTemplar

Thanks a lot guys for your fast responses ;) 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?

hexskrew

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.

LastTemplar

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

hexskrew

#8
Feb 20, 2011, 10:52 pm Last Edit: Feb 21, 2011, 12:18 am by hexskrew Reason: 1
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

PaulS

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

LastTemplar

Again, thanks a lot guys, you're really helping me out :)
If you'll have any other contributions I'll be glad to see them ;)
Cheers!

Go Up