Go Down

Topic: Major help with VB -> Arduino (Read 6482 times) previous topic - next topic


Aug 27, 2009, 03:42 pm Last Edit: Aug 27, 2009, 05:08 pm by Du-z Reason: 1
@ Andrew

I changed the names of the buttons, it had more problems that that though. thank you for the download.

Edit: IT WORKS!!!! thank you so much


thanks mate


HI Andrew,
I am using your firmata VB code to control a simple remote control car.
I am trying to use the FirmataVB1.DigitalPinWrite command so what value would I have to use for the on state and the off state.And what are the pin numbers i can use?

Its like FirmataVB1.DigitalWrite(PinNumber,value)
          Pin NUmber can be 0-12
          what are the values for the keyword 'value' for on and off? :o


Hi jith,

In code you'd pass the value 1 for on and 0 (digit zero) for off.



Thank you for that quick reply andrew.

Lets say if i want to use just the digitalpinwrite function,should i include the firmata.dll or digitalpincontrol.dll .which file should i include in the program.?


I get this error when i try to use it.
I have changed the properties of the firmata component in design view to COM4 and baud rate 57600 which works for the sample application from your website.

I think i have to define a method to open the COM port,but dont know how.

Can you tell me what are the components that i need to include to use the  FirmataVB1.digitalpinwrite(Pin number value) option?

I have included only the firmata.dll as mentioned in your site.Nothing else.

Here is the error

Problem with digitalWrite
System.InvalidOperationException:The port is closed.
at System.IO.Ports.SerialPort.Write(Byte[] buffer,Int32 offset,Int32 count) at Firmata.FirmataVB.DigitalWrite(Int32 pin,Int32 value)


Hi jith,

Without looking at your entire code and knowing exactly how you've wired up your application I can't really help.

My only suggestion is to download the sample applications and work through these until you have a thorough understanding of how they work.  In essence you need to include the FirmataVB.net component, create code to establish a COM link (see how this is done in the sample apps - the non 'extended' one should be simpler to follow) and then use code to send messages to the DigitalPin command. The DigitalPinControl component is just a handy way to add the visual functionality to your project. You can simply use the FirmataVB1.DigitalPinWrite as you have been doing in your own code instead.

Hope this helps.


Andrew Craigie


Hi Andrew,
Thank you.Now its working.I just had to include firmataVB1.connect(COM4,57600) to use the functionality of digital pin write.
And i have included the firmatavb.dll component in the design view.

What i was trying to do was to create a user interface a rc car using the arrow keys in my project.The rc car source code form JBprojects.net was using the parallel port but i needed the usb port functionality to make it work with my laptop which doesnt have a parallel port.

Now its working.
:) :)

Go Up