Go Down

Topic: Visual Basic, Firmata and Arduino (Read 3223 times) previous topic - next topic

Ybot900

Hi,

I am relatively new to Ardiuno but can code reasonably well in VB.net, so was wondering if it would be possible to send commands to the Arduino using Visual Basic.

Looking around, I found FirmataVB and added it to Visual Studio, but still can't get the example application (or anything else for that matter) to work.

Could someone please list the steps I need to get this working, or, if possible, a more simple application I could use to get me started.

Thanks in advance,
Toby

Coding Badly

Quote
Hi,

Greetings.

Quote
I am relatively new to Ardiuno but can code reasonably well in VB.net, so was wondering if it would be possible to send commands to the Arduino using Visual Basic.

Yes.

Quote
Could someone please list the steps I need to get this working, or, if possible, a more simple application I could use to get me started.

Open serial port.  Set baud rate.  Send data.  Receive data.

The Arduino is presented to the computer as a serial port.

Ybot900

Thanks for the fast reply, but I'm in need of a little more detail!

First of all, what do I need to upload to the Arduino.

Secondly, what imports do I need within Visual Basic

Thirdly, what is the VB code for setting baud rate etc.

Also, perhaps it would help if I explained my project a little.

I have a cheap RC car which is controlled using buttons pressed by the user. I want to simulate a button press using the Arduino and interface it in Visual Basic, so I can control it using the keyboard or a UI.

Thanks again.

Coding Badly


I can't help with the Visual Basic questions.

Ybot900

Okay, thanks.

Do you know how I would set up the Arduino for use with Firmata?

Thanks

billroy

You might consider Bitlash as an alternative.  It is available for download at http://bitlash.net

Bitlash is a command shell and interpreter that runs on Arduino.  You upload it and then send commands to it over the serial port.  The Bitlash language has commands to control the IO pins and many Arduino functions are available.  You can save small Bitlash programs in EEPROM to automate your application.

With Bitlash you can test and hack your application using the Serial Monitor and then automate it by sending the same commands with VB, Python, C++, Processing, or whatever.

Happy hacking,

-br
http://bitlash.net
http://entropymouse.com


Ybot900

Hi billroy, I looked at Bitlash and it looks very interesting! I have one question though, do I use vb.net as my terminal emulator?

In other words, how do I incorporate Visual Studio into this?

I apologise for my lack of knowledge, I'm a newbie!

Thanks

BKnight760

You'll have a large difficulty getting VB to upload code to the Arduino.  Sending data and communicating with a sketch already uploaded to the board is quite easy.  You need to put a MSComm control on your form.  You'll find that in the list of components as "Microsoft Comm Control"  Once you have that, it's quite easy, just read the MSDN about the Comm control if you don't see how to do it from there.


Go Up