1

I'm building an application using C# in Visual Studio 2012. Part of the requirement is to interface it with the Arduino board. For this I used a Visual Studio add-on called Visual Micro.

The add-on works by just building it and the sketches get deployed to the board if one is connected. I have been trying to build this Arduino project with the C# code itself, so once I am done developing my application, I would be able to deploy sketches to the board via my C# executable application. Is it possible?

2 Answers 2

1

Do you want to,

  1. Compile C# code and burn in into the Arduino board (or)

  2. you are developing an UI application to deploy a C/C++ based application into the board?

    1. Is not possible, because you cannot run a C# application in an Arduino board (unless the board is based on ARM controllers and you are hosting the .NET CE framework inside it.)

    2. This is possible. You need to download and manipulate a command line tool called AVRDUDE which can do the trick for you.

Sign up to request clarification or add additional context in comments.

3 Comments

I am referring to the second option. I read into some articles that mentioned avrdude, but I was wondering if I could make use of the visual micro add-on which basically deploys the sketch to the board when the build command is given. My train of thought was to see if there was any way that the build command could be triggered for the arduino project in Visual Studio through C# code.
Do you want to deploy from within VS or from outside VS ?
To deploy from within Visual studio you could write a Extension to visual studio very quickly to achieve that, i could perhaps share samples if you want to. If from outside VS, just open the Arduino IDE source code from the github repository (github.com/arduino) and transliterate the code that does the deployment into the board.
0

To deploy from within Visual Studio you use macros, all of the Visual Micro Arduino commands are available as Macros.

Alternatively, Visual Micro uses a constant build folder for each project so you can call avrdude.exe to perform the upload of the compiled programs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.