Pages: 1 [2]   Go Down
Author Topic: Major help with VB -> Arduino  (Read 2602 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ 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

@uber

thanks mate
« Last Edit: August 27, 2009, 10:08:28 am by Du-z » Logged

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

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
Logged

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

Hi jith,

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

Regards.
Logged


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

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.?
Logged

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

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

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

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.

Regards

Andrew Craigie
Logged


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

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


Logged

Pages: 1 [2]   Go Up
Jump to: