Hey Willa,
Danke für den Link, ist ganz gut erklärt
Habe auch schon etwas ausprobiert:
Code:
$regfile = "m32def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 8000000
$baud = 9600
Config Servos = 5 , Servo1 = Portb.0 , Servo2 = Portb.1 , Servo3 = Portb.2 , Servo4 = Portb.3 , Servo5 = Portb.4 , Reload = 10
Config Portb = Output
Enable Interrupts
Dim Inputstring As String * 5
Dim Data_available As Byte
Dim A_empfangen As Byte
Dim B_empfangen As Byte
Dim C_empfangen As Byte
Dim D_empfangen As Byte
Dim E_empfangen As Byte
Dim A_string As String * 5
Dim B_string As String * 5
Dim C_string As String * 5
Dim D_string As String * 5
Dim E_string As String * 5
Dim A_integer As Integer
Dim B_integer As Integer
Dim C_integer As Integer
Dim D_integer As Integer
Dim E_integer As Integer
Do
Print "Test"
Data_available = Ischarwaiting()
If Data_available > 0 Then
Input "" , Inputstring
A_empfangen = Instr(inputstring , "A")
B_empfangen = Instr(inputstring , "B")
C_empfangen = Instr(inputstring , "C")
D_empfangen = Instr(inputstring , "D")
E_empfangen = Instr(inputstring , "E")
Print Inputstring
If A_empfangen = 1 Then
A_string = Mid(inputstring , 2)
A_integer = Val(a_string)
End If
If B_empfangen = 1 Then
B_string = Mid(inputstring , 2)
B_integer = Val(b_string)
End If
If C_empfangen = 1 Then
C_string = Mid(inputstring , 2)
C_integer = Val(c_string)
End If
If D_empfangen = 1 Then
D_string = Mid(inputstring , 2)
D_integer = Val(d_string)
End If
If E_empfangen = 1 Then
E_string = Mid(inputstring , 2)
E_integer = Val(e_string)
End If
End If
Servo(1) = A_integer
Servo(2) = B_integer
Servo(3) = C_integer
Servo(4) = D_integer
Servo(5) = E_integer
Waitms 1000
Loop
End
Aber noch nicht einmal Print "Test" funktioniert,
weisst du woran es liegen könnte?
Mfg
Lesezeichen