Code Help Needed

Supporting Visual Studio on Windows
Deitz
Fresh meat
Posts: 2
Joined: Sun Sep 08, 2013 1:16 pm
Contact:

Code Help Needed

Postby Deitz » Sun Sep 08, 2013 1:26 pm

This is my first Phidgets project, and I'm in need of a little help. Let me list the devices used ,and the goal in mind.

1011_0 - PhidgetInterfaceKit 2/2/2
1135_0 - Precision Voltage Sensor

My intention is to use these devices to capture the voltage reading from a battery. Unfortunately my coding skills are less than acquitted, and I would like to run a simple window to give a constant voltage reading when ever a battery is connect. Here is what I have so far. I hope someone can assist the noob.

Code: Select all

Public Class Form1
    Dim WithEvents ifKit As Phidgets.InterfaceKit
    Private _sensorInArray As TextBox
    Private Property sensorInArray(p1 As Integer) As TextBox
        Get
            Return _sensorInArray
        End Get
        Set(value As TextBox)
            _sensorInArray = value
        End Set
    End Property

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ifKit = New Phidgets.InterfaceKit
        ifKit.open()
        ifKit.waitForAttachment(3000)
    End Sub

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.
    FormClosingEventArgs) Handles Me.FormClosing
        RemoveHandler ifKit.SensorChange, AddressOf ifKit_SensorChange
        Application.DoEvents()
        ifKit.close()
    End Sub

    Private Sub ifKit_SensorChange(sender As Object, e As Phidgets.Events.SensorChangeEventArgs)
        Throw New NotImplementedException
    End Sub

End Class

Any help would be greatly appreciated!

Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest