Pages: [1]   Go Down
Author Topic: Arduino <> Firmata <> Visual Basic .NE  (Read 2312 times)
0 Members and 1 Guest are viewing this topic.
Glasgow, Scotland
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

In an attempt to make creating .NET applications that can easily communicate with an Arduino using a serial port i've put together a .NET component that implements the Firmata V2.0 protocol - FirmataVB.dll. This has been written by adapting existing Firmata library code into Visual Basic.



The FirmataVB.dll encapsulates a .NET SerialPort component and provides properties, events and methods to receive and send digital and analog messages via Firmata to and from an Arduino running the Standard Firmata sketch.

I've also put together a couple of User Controls and sample applications to make testing the FirmataVB library quick and easy.

Theres a DigitalPinControl that provides pre-coded options, buttons, slider bars and graphics to receive and send digital Firmata messages. You can simply drag the DigitalPinControl onto a form to create as many instances as you have pins on your Arduino board



To go with the DigitalPinControl there's also an AnalogPinControl to receive values from the analog pins on the Arduino.



You can freely download the component, user controls and all the project code at:

http://www.acraigie.com/programming/firmatavb/default.html

This is a work in progress and I'd appreciate any feedback, comments and suggestions for improving the code and controls.



All the code and applications are open source and licensed under the GNU GPL V3 licence..

« Last Edit: May 05, 2009, 03:37:48 am by ACraigie » Logged


Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 5
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is really cool, and long needed.

Thanks for sharing.
Logged

Austria
Offline Offline
Sr. Member
****
Karma: 3
Posts: 260
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

wow, thats cool  smiley

up to what com port does it work?

my Arduinos are always 26 and up...
Logged


Glasgow, Scotland
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi designer2k2,

It will work with any numbered COM port. You simply supply the name of the COM port as a string eg. "COM26". You can set this in the Properties pane for the FirmataVB instance at design time or in code.

Check out the ArduinoFirmataVBExtended - http://www.acraigie.com/programming/firmatavb/downloads/ArduinoFirmataVBExtended.zip sample application. It contains a drop down list in the toolstrip that allows you to choose any COM port to connect to at run time.

 smiley
Logged


Austria
Offline Offline
Sr. Member
****
Karma: 3
Posts: 260
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

nice, i will use that for shure  smiley
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

I'm a total newb to arduino and programming in general and can't seem to get off the ground.  I am trying to use the firmata library and the firmata VB extended on my sanguino but am having no success.

Any help would be greatly appreciated.

Thanks
Logged

Palmetto, FL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 138
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What isn't working?
Logged

Brooklyn, NY, USA
Offline Offline
Full Member
***
Karma: 0
Posts: 115
arduino for all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know if it works on the Sanguino, it might, but I've never tried it.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I don't know.  I loaded the firmata sketch on the sanguino and the extended example of Firmata VB in VB express and ran the debug and couldn't get any LEDs connnected to the digital pins to light up. I made all the ditital pins output and toggled them all.
I choose the same com port (via usb) that I used to load the skecth.

My goal is to build an automated brewery controller similar to the brewtroller http://www.brewtroller.com/ but I want to have most of the controls from a laptop.  Of course my goal is way beyond my reach at this point but I expect to learn alot from it.

The system will have 4 temp sensors, 3 presure senors, 5 pneumatic valves, 2 pumps and 2 heating elements.

-wes
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Andrew -
Thanks so much for the firmata.vb suite.
I signed up to this forum  just to thank you and the firmata people for the non-compensated work you have done which just made my life easier and is making this whole arduino thing fun.  My LEDs are dimming via VB smiley  My temp gauge get bigger when I breathe on it.  heh.  all cool stuff.
one small recomendation would be to put a note on your site regarding issues with firmata 0017 and point people to the beta7 which made your VB finally come alive for me.
See http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1252791964/15

thanks again.
« Last Edit: December 18, 2009, 06:29:50 am by jointtech » Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Since you asked for comments...  smiley-wink
If you turn off an analog pin it doesnt clear the progress bar.
I suppose that could be on purpose so you can see the last level it reported but I like off to mean off.  

This one is really irrelevant and probably nothing can be done about it and probably wont happen in the real world.  If you dont have anything connected to an analog pin and then turn it on the levels go crazy.  I suppose it gets enough feedback to register.  

FYI I am using Visual Studio 2010 beta with no issues.  It converts the sample projects and debugs with no errors.  Even upgrades the pointers to .net4beta

I have a some questions regarding grabbing the data from the analog pin control, but I need to formulate them in my head a bit better first smiley-wink
Ah, this was supposed to be my first electronics/soldering project but it turned back into yet another coding project.  :smiley  my VB is really rusty.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 291
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ha.  nevermind.  I see the control to clear the bar if off.  smiley-wink
Logged

Pages: [1]   Go Up
Jump to: