Code: Alles auswählen
OpenConsole()
ConsoleTitle ("Control your K8055! Programmed by oNNy")
retype:
ClearConsole() : ConsoleLocate (5,2)
Print ("Welcome to -Control your K8055!-. Input your command here!")
ConsoleLocate (5,3)
Print ("Type help For more informations! ")
ConsoleLocate (8,6)
Print ("Enter your command here: ")
command$=Input()
If command$ = "connect K8055" Or command$ = "connect k8055"
ClearConsole() : ConsoleLocate (5,3)
Print ("Loading libary") : OpenLibrary(0, "K8055D.dll")
For a = 0 To 10 : Delay(20) : Print (".") : Next
ConsoleLocate (5,4) : Print ("Connecting")
CallCFunction(0, "OpenDevice",0)
For a = 0 To 10 : Delay(20) : Print (".") : Next
Delay(1000) : ConsoleLocate (5,5)
Print ("Connected! Got 32 commands!")
Else
If command$ = "exit" Or command$ = "Exit" Or command$ = "EXIT" : End : EndIf
Goto retype : EndIf
retype2:
ConsoleLocate (8,10)
Print ("Enter your command here: ")
command2$=Input()
If Mid(command2$,0,13) = "blink channel"
If Mid(command2$,17,1) = "1"
;For a = 0 To 50
CallCFunction(0, "SetDigitalChannel",Mid(command2$,14,1))
;Delay(Val(Mid(command$,20,Len(command2$)-19)))
;CallCFunction(0, "ClearDigitalChannel",Mid(command2$,14,1))
;Next
Else
EndIf : EndIf
If command2$ = "test digital"
For a = 0 To 8
CallCFunction(0, "SetDigitalChannel",a)
Delay(100)
CallCFunction(0, "ClearDigitalChannel",a)
Next
Goto retype2
EndIf
If Mid(command2$,0,7) = "channel"
If Mid(command2$,11,1) = "1"
CallCFunction(0, "SetDigitalChannel",Val(Mid(command2$,8,1)))
EndIf
If Mid(command2$,11,1) = "0"
CallCFunction(0, "ClearDigitalChannel",Val(Mid(command2$,8,1)))
EndIf
Goto retype2
EndIf
;If command$ = "channel2 -1"
;CallCFunction(0, "SetDigitalChannel",2)
;Goto retype2
;EndIf
Delay (6000)
CloseConsole()
fehlt da irgendein initalisierungs befehl?


