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.

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)

PeterH

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

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.htmI 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 overThanks

@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

@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:-

//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.

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 differentDim 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 ArduinoBTW: 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