Hallo alle VB gebruikers,

Ik zit met een klein probleemje?

Ik heb net het experimenteerbordje K8055 van velleman gekocht dat via USB wordt aangesloten.
pdf : http://www.velleman.be/Downloads/0/Manual_K8055_UK.pdf

Ik zou door het drukken op de analoge testtoetsen altijd verschillende wave files willen afspelen om later met 5 verschillende voeltoetsen binnen te komen.

Ik heb de DDL files van velleman erbij gekregen en via de source code die ik van velleman heb gekregen heb ik het bordje getest, de 5 analoge ingangen werken.

hier is de code voor ze binnen te lezen:

Option Explicit
Dim DoNothing As Boolean
Dim n As Integer
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (Data1 As Long, Data2 As Long)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long, ByVal Data As Long)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal Data1 As Long, ByVal Data2 As Long)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal Data As Long)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long) As Boolean
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Long
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Long) As Long
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Long)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Long, ByVal DebounceTime As Long)



'de code voor de kaart te verbinden'
Private Sub Connect_Click()
    Dim CardAddress As Long
    Dim h As Long
    CardAddress = 0
    CardAddress = 3 - (Check1(0).Value + Check1(1).Value * 2)
    h = OpenDevice(CardAddress)
    Select Case h
        Case 0, 1, 2, 3
            Label1.Caption = "Card " + Str(h) + " connected"
        Case -1
            Label1.Caption = "Card " + Str(CardAddress) + " not found"
    End Select
    If h >= 0 Then Timer1.Enabled = True
End Sub

'de code voor de inputs'
Private Sub Timer1_Timer()
    Timer1.Enabled = False
    Dim i As Long
    Dim Data1 As Long
    Dim Data2 As Long
    i = ReadAllDigital
    Check2(0).Value = (i And 1)
    Check2(1).Value = (i And 2) / 2
    Check2(2).Value = (i And 4) / 4
    Check2(3).Value = (i And 8) / 8
    Check2(4).Value = (i And 16) / 16
    Timer1.Enabled = True
End Sub

nu moet ik de code nog kunnen koppelen aan .wave files.

Alvast bedankt voor jullie hulp!!!

groetjes,
Igor