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.
I have installed VB 2010
Why? What do you expect to do with it?
and was wondering if people are having good luck with it.
Depends on what YOU are trying to do.
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.
Thanks for all replies.
Somehow, I doubt that.
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.
What are you trying to do? What problems are you having in achieving that?
I installed Visual Micro, but I didn’t liked it, so I removed it couple minutes after.
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.
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.
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)
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.
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.
truck56: 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 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.
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.
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
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.
@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:-
This is the VB.NET code in the OnTick event behind your Form.
//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
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
PaulS: 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.
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 ;)
I liked VB a lot 12-14 years ago, but when the first visual studio .net arrived the year 2002, vb just felt like a broken language on life support, versus a much cleaner c#.
Now with f# supporting paralellism naturally in every instruction, c# starts to feel outdated too :P
Eried is correct. + This is a useful web site that allows us to convert from one .NET language to another:- http://www.developerfusion.com/tools/
@Eried, you were right that earlier versions of visual micro failed to compile some large arduino projects. Vm was sorting the arduino files alphabetically aA>zZ for the compiler. This caused a problem in some large projects such as ArduPilot. The Arduino sort order is AZ-az which the latest versions of vm applies. Some developers of large projects have included code definitions that rely upon this sort order to be correct, hence the failure
I repost the image below because in the bottom left of the image you can see that ArduPlane, the biggest Arduino project in the world, has compiled correctly to a hex size of 157,892 bytes. You can't see in the image but the compile took 5 seconds.
As concerns startup speed of visual studio, I would be interested to know which other extensions or addins you might have loadedso that we can replicate your enviroment. We normally only see a reduction in startup speed if Visual Studio is misbehaving in the background.
Generally I find that even with the addin installed visual studio doesn't slow things down and always starts much faster than the arduino ide. However, there are still areas for improvement in vm where, for example, the addin might delay loading the boards and library lists until they are required.
You certainly have some great knowledge and hope you try the add-in again. I look forward to hearing from you in our forum and helping to improve whatever you find cumbersome.
All I can say is that the ArduPilot users that have embraced Visual Studio and the Arduino plugin, say that they love it, especially the new memory usage reporting which is enabled as follows:-
Good luck, Tim
Maybe I can send you my project to test compile it, VS just added a bunch of files over my project folder, so I hated the plugin and removed it. I can try it again.
I use only ReSharper plugin. I had a lot of libraries so the loading progress always shown up in the status bar, "loading libraries...". The plugin it is a good idea and I like a lot Visual Studio, I have a netduino board too, but for now I just feel the simple Arduino IDE it is just nice, I just miss a good intellisense in the java environment.
Yes please do send the files to any address at visualmicro.com, I will be surprised if they fail but always have an open mind. When did you last try visual micro?
Files in sketch folder Early versions of vm used to use build files which were stored in the sketch folder. Since last year we use a different system and create some files in a folder below each sketch called "Visual Micro". So you don't get any files in the sketch folder. However visual studio creates the solution and project files in the sketch folder by default but you have the control to specify these files are located elsewhere.
Visual studio also attempts to create a PCH folder below the sketch where it stores its own C++ intellisense cache. The PCH folder is annoying because you are not allowed to delete it. However you can specify in the Visual Studio options that PCH folders are created in your temp folder away from the sketch. This article explains what to click to set PCH to temp. After you have altered the setting you will find that you can delete the PCH folders and they will not appear again for new projects and sketches.
OK, I tested visual micro last week, the crappyness of Arduino 1.0.1 was just too damn high xD lot of issues with serial port, and all of the bad experience I had almost “controlled” in 0023 reactivated due the fact of having to go with 1.0 because newer libraries, so I tried some alternatives, at the end none of them was a sweet experience.