Arduino and Visual Basic Part 3: Controlling an Arduino. My first attempt resulted in a very basic app to receive data from the Arduino which taught me the basics of serial communication in VB. The next step is two way communication and controlling the Arduino from the VB program. /* ***** Sketch Arduino and Visual Basic Part 3.
When you think about serial communications, Microsoft Excel isn’t typically the first program that springs to mind. But this spreadsheet has a rather powerful scripting language hidden away inside it, which can, with a little coding, be used to. The scripting language is called, and it has been a part of Microsoft’s Office suite since 1993. Since then, it has evolved into a powerful (if sometimes frustrating) language that offers a subset of the features from Visual Basic. It can be a useful tool. Imagine, for instance, that you are logging data from an instrument that has a serial port (or even an emulated one over USB). With a bit of VBA, you could create a spreadsheet that talks to the instrument directly, grabbing the data and processing it as required straight into the spreadsheet.
It’s a handy trick that I have used myself several times, and Maurizio does a nice job of explaining how the code works, and how to integrate this code into Excel. If you’re looking for other ways to leverage this Excel feature, consider or building inside of your sheets. Posted in Tagged, Post navigation. Thanks for the article, I think this is an great way to log the data coming from my Arduino. I’ve seen some other tools that people have written to log and graph serial data, but it’s nice being able to do it with software that’s already installed on my computer and is familiar to me (as opposed to installing python and having to figure out which command prompt I’m supposed to use to write code and which one to use to run code. Don’t listen to the jerks out there, I think you guys at HaD do an awesome job!
So how do we get our Arduino to interface with our computer? Well, if the Serial Monitor on the Arduino IDE is not good enough, then you could use any program that is capable of Serial communication. Fortunately, Processing is one of those programs, but you could use C, Java, Python, Microsoft Excel (using VBA), VB.Net, Gobetwino or some other programming language. Two programs will be created: One will be uploaded to the Arduino using the Arduino IDE, and the other will run on the computer. In this example we will use Processing as the program that will run on the computer. Hi Thaslim - I deleted your comment due to the large amount of text you pasted into it. These types of questions are always best posted on the Arduino Forum: However, I noticed that you seemed to have omitted some important code, especially in the include# statement.
And also the pins you are choosing to use to communicate with the shield. Have a look at this site - it may help you get on the right track. I don't have a GPRS shield or an Arduino Mega, which is why I have directed you to the sites mentioned above. Regards Scott. This is really the most helpful ever which I found in the internet. The authors of the compiler-software of the arduino have not only created a wonderful compiler. With this peace of software processing plus arduino's terminal including the arduino as target is the best workbench ever found in live.
In 1982 I learned to program 8080 systems in machine code - we had nothing else - later came basic and C, thank you so much for the tutorial - I'm 71 years old, but this gets me feeling like 20 years younger:-).