so mach ich es mit Bascom mit einem atmega 32:

Code:
config int2=rising

On Int2 Int2_int

Enable Interrupts
Enable Int2

Open "comb.2:19200,8,n,1" For Input As #1
Open "comd.6:19200,8,n,1" For Output As #2

do
   waitms 300
loop

End

Int2_int:
   Disable Int2
   Enable Interrupts
   input #1, text
   waitms 5
   call empfang()
   enable int2
Return

sub empfang()
 If Text = "vor" Then
   M_wert_a = 100
   M_wert_b = 100
   Call Robby_vor()
 End If
 If Text = "zurueck" Then
   M_wert_a = 100
   M_wert_b = 100
   Call Robby_zurueck()
 End If
 If Text = "links" Then
   M_wert_a = 60
   M_wert_b = 60
   Call Robby_links()
 End If
 If Text = "rechts" Then
   M_wert_a = 60
   M_wert_b = 60
   Call Robby_rechts()
 End If
 If Text = "stop" Then
  Call Robby_aus()
 End If
end sub