Go Down

Topic: Anybody using Visual Studio pro 2010 with Arduino? (Read 2732 times) previous topic - next topic

truck56

I have installed VB 2010 and was wondering if people are having good luck with it.
There is a plugin called visual micro, that is for arduino in VB, any luck with that?
Thanks for all replies.

PaulS

Quote
I have installed VB 2010

Why? What do you expect to do with it?

Quote
and was wondering if people are having good luck with it.

Depends on what YOU are trying to do.

Quote
There is a plugin called visual micro, that is for arduino in VB, any luck with that?

Any luck doing what? When people talk about luck with computer programming, I question their skill level. There is no luck involved in getting two computers to talk to each other. Only skill.

Quote
Thanks for all replies.

Somehow, I doubt that.

PeterH


I have installed VB 2010 and was wondering if people are having good luck with it.
There is a plugin called visual micro, that is for arduino in VB, any luck with that?
Thanks for all replies.


What are you trying to do? What problems are you having in achieving that?
I only provide help via the forum - please do not contact me for private consultancy.

eried

I installed Visual Micro, but I didn't liked it, so I removed it couple minutes after.
My website: http://ried.cl

truck56

I want to read the serial out from the arduino and make fancy displays in VB. I just don't want to waste time learning VB if there is a lot of problems using  it with arduino. So far i have installed visual micro and it did not work, Thanks for that reply.

eried


I want to read the serial out from the arduino and make fancy displays in VB. I just don't want to waste time learning VB if there is a lot of problems using  it with arduino. So far i have installed visual micro and it did not work, Thanks for that reply.


Well, first you need to learn to read. Visual Micro is not the thing you need, in visual micro you use the same language for your arduino, is just another interface. You can always build fancy interfaces in any program and link to your arduino with SerialPort (in VB or any language)
My website: http://ried.cl

PaulS

Visual Micro is an environment for programming the Arduino. It has nothing to do with how you might write code to talk to the running Arduino application.

Quote
I want to read the serial out from the arduino and make fancy displays in VB.

In my mind, far more impressive, and far easier to write, applications can be developed using C#. And no one has accused C# developers of using a lame development platform. Your mileage may vary.

PeterH


I want to ... make fancy displays in VB.


I assume that VB is a solution you're considering and not a goal in its own right.

You don't mention any prior programming skills so I assume you would need to learn whatever language you adopted. I also assume that you would be programming the Arduino yourself. In that case it would be sensible to use a similar language for both tasks to reduce your learning curve. That implies you should be looking for a 'C'/C++/C# based solution.

What does "fancy displays" mean? What sort of thing will you be displaying? (Charts? Text? Tables? Graphical widgets etc? Popup windows?)

Will you be accessing the "fancy displays" locally (on the computer the Arduino is plugged in to) or remotely (from a different computer)?
I only provide help via the forum - please do not contact me for private consultancy.

truck56

I have learned how to write programs in Assembly, Gwbasic, Quickbasic back in 1989, but that was many brain cells ago. Almost like starting over again. Thinking about C# since it is close to VB. I am wanting to make gauges and graphs from the arduino serial out.

n2dfire2

I have done this very thing.  I use vb.net to make a gui for my home automation.  You are correct that you will use serial commands to communicate back and forth with the arduino.

You can use vb to create a gui.  I have many graphical buttons on my gui that once clicked on create a event that then sends serial data to the arduino.  For example if you click a turn on light button the vb will send a number 1 to the arduino over the serial.  The arduino then is monitoring the serial input and reads a 1 and turns on a digital output to turn on a light or do what ever you want.

The arduino also sends sensor data out on the serial and the vb program is monitoring that.  I have a timer event that reads the serial every so many seconds and use that data to update a graphical gauge for a sensor data.

That is the basic of the logic behind what you need to do.  You will need to learn the language commands for both the arduino and the VB.net to do this, but both are pretty easy.

The arduino commands will be real easy to learn.  The vb could be learned in a very short time also.  Its pretty easy to make a gui in vb.  Alot of it is drag and drop commands(objects) to make buttons and different graphical objects.  Then just make some code(like sending some serial data) for these graphical objects for certain events that occur like button click.

truck56

I have built this simple cloud charge monitor   http://www.techlib.com/electronics/cloud.htm
I have it hooked up to an arduino uno with 9 LED's
that light up as the charge  progressive, works good with a comb run thru your hair and over the pan. We are in a drought right now, so I am waiting for a real T-storm for the real test.
The arduino powers the circuit and will run off the laptop, so no fear of lightning coming in from the wall. I have serial print set up in the arduino code and can read it in serial monitor, I just need to figure the code in VB to get the data into a text box, then I can work on gauges and graphs. I am using com 2 default settings. If you have a short program in VB to do that and would share it, it would be much appreciated. Just a hump to get over
Thanks

PaulS

Quote
Thinking about C# since it is close to VB.

Think again. There are no similarities between VB and C# beyond the fact that the programming application you will be using starts with Visual in both cases.

Visual Micro

#12
Aug 28, 2012, 01:18 am Last Edit: Aug 28, 2012, 01:29 am by Visual Micro Reason: 1
Hello,

@eried I guess you are an experienced Eclipse user? I'm very interested to hear what you didn't like about visual studio or the visual micro plugin. The combination provides a very useful development system for both new and experienced users. A free tool that provides everything the arduino ide provides, is 100% compatible with arduino but with the added benefits of intellisense, code completion, error correction, super fast compile, memory usage reporting and much more :)

Read more about arduino development in visual studio: Arduino Learning by Example


@truck56 There are many happy users of arduino for visual studio. We would like to help you fix any install problem you might be having. Please register for our forum so that we can guide you through a fix. It will be very easy I promise. Because the plugin is free we have to reply on users coming to our forum for help. We can't find the time to scan the many forums that service arduino users. Please do join the forum thanks.

As a Visual Studio user I can answer your question as follows:-

Add a Timer control to your windows form. Set the Interval of the timer to between 50 and 100 milliseconds. In the OnTick event of the Timer you can add code similar to the following. We assume, as you have said, that you have an open serial connection and the arduino is sending data to the pc.

This example assumes the arduino has sent "Hello Wold" using the following arduino code:-
Code: [Select]
Serial.println("Hello World");

This is the VB.NET code in the OnTick event behind your Form.

Code: [Select]
//Tip: DoubleClick the OnTick event on the lightening button of the timers property box to have an OnTick event added to your code automatically.
//Sub OnTick_Timer1

 if mySerial.BytesToRead>0 then
   dim myStr as String = mySerial.ReadLine()
   myTextBox.Text = myStr
 end if
 

//End Sub


Tip: If you find you have become experienced with vb.net or c# graphical controls then please join the beta team for our arduino debug solution. The solution contains an open source extensibility system that enables you to use your .NET user controls while debugging arduino. Alternatively you can grab the source of our examples and use them in your own projects. This might not be relevant to you but thought it worth mentioning. Join the beta team by emailing beta [at] visualmicro.com.

In the image below you can see normal C# and VB.NET windows controls communicating real-time with the arduino debugger.



Read more here

This is also a good article and will provide you some useful example source

I hope you find or found your solution, Tim
Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

eried

Nah, I use a lot Visual Studio, but the pluging didn't worked as I expected. Added a big delay to VS startup and I tried to load a big project and it didn't compiled.

I liked the idea a lot but I think I will wait until its a bit more polished
My website: http://ried.cl

michael_x


There are no similarities between VB and C# beyond the fact that the programming application you will be using starts with Visual in both cases.
^
Think again. Sure there are: Both are translated to the same IL and run as managed code in the same .net runtime

Just the syntax is different
Dim i as Integer vs. Integer i;
If you prefer CR over semicolons and think curly braces are cryptic, "End While" is much clearer,  go for VB in Visual Studio.
It does not matter if you use VB or C#, in reality it's almost the same.

Arduino c++ is rather completely different from c# :
- First of all, there's no System namespace
- And it's a big mistake that there's a String class in Arduino


BTW: A millenium ago we built an application with embedded VB 6.0 user programming possibilities. Great stuff, with all those self explaining Active X controls available!
This was updated into a VB.NET based Add-On to Visual Studio 2003 etc.
Setting up preconfigured VB projects with base functionality and references etc.
--- like Arduino IDE providing main(), but requiring setup() and loop() instead ---

We stuck with VB because we thought, C# programmers do not need this kind of spoonfeeding. Wrong.
After writing a "How To Use It From C# " whitepaper, most of our support calls disappeared.
  There are no similarities between VB users and C# users ... regarding their self esteem ;)

Go Up