Site Navigation

Page Navigation


Digital Pin User Control

FirmataVB dll image

To use the DigitalPinControl User Control:

  1. Download the folder to your computer
  2. Unzip or extract
  3. Open the FirmataVB Components folder
  4. Locate the DigitalPinControl.dll file
  5. Copy the DigitalPinControl.dll file to a suitable location. It's a good idea to place a copy of it in the project folder for your application
  6. Create a new Windows Forms Application using Visual Studio or Visual Basic Express Edition
  7. Right click anywhere on the Toolbox
  8. Select Choose Items...
    The Choose Toolbox Items dialog window will open.
  9. Click the Browse... button
    An Open dialog will appear.
  10. Navigate to the DigitalPinControl.dll file
  11. Select the DigitalPinControl.dll file
  12. Click the Open button
  13. Click the OK button
    The DigitalPinControl control should now appear in the Toolbox
    Toolbox image showing components
  14. Click and drag the DigitalPinControl control onto a form in your project
    A DigitalPinControl will appear on the form.
    Digital Pin Control image
  15. In the Properties pane enter the number of the pin on your Arduino board that you want to associate this control with in the PinNumber property.
    If you want to use the techniques for addressing the DigitalPinControls on your form that is used in the sample application then make sure you enter a unique PinNumber for each DigitalPinControl
  16. Drag as many DigitalPinControls onto your form as you need.
    For an Arduino Diecimila that would be 11 - for pins 2 to 12. You only need to create a DigitalPinControl for the pins you're actually using so if you don't have anything wired to a particular pin don't create a control for it.

Digital Pin Controls on form image

As you enter a number for the PinNumber property you may notice that for certain pin numbers the PWM portions of the control are displayed. The PWM radio button and slider bar will only be displayed on controls that refer to PWM enabled pins on the Arduino. (At the moment only the Diecimila's pins have been coded into the user control).

If you are using a different board then you might want to open the DigitalPinControl project and change its code to suit your board. Hopefully i'll get round to adding definitions for other boards soon.

To see how the DigitalPinControl can be used to receive and send digital messages via FirmataVB have a look at the sample applications code.

Have you made use of FirmataVB or the code?

If so, please consider showing your appreciation (all donations used to continue to pay for web hosting of this resource)

< FirmataVB