from java.lang import String
from time import sleep

arduino = Runtime.createAndStart("arduino", "Arduino")
arduino.serial.refresh()
sleep(2)
arduino.connect("COM8") 

m1 = Runtime.start("m1","Motor")
m1.setType2Pwm(10,11)
m1.attach(arduino)

keyboard = Runtime.createAndStart("keyboard", "Keyboard")
keyboard.addCommand("Links", "python", "Links", "Links")
keyboard.addCommand("Rechts", "python", "Rechts", "Rechts")

global keyboardInput

def Links(cmd):
    keyboardInput = "Links"
    print "motor left"
    m1.move(1.0)
    sleep(1)
    m1.move(0.0)

def Rechts(cmd):
    keyboardInput = "Rechts"
    print "motor right"
    m1.move(-1.0)
    sleep(1)
    m1.move(0.0)

@@ -159,9 +159,9 @@
 %22COM
-8
+5
 %22) %0A
@@ -213,13 +213,11 @@
 Pwm(
-10,11
+5,6
 )%0Am1
@@ -511,19 +511,19 @@
 m1.move(
-1.0
+0.5
 )%0A    sl
@@ -518,33 +518,35 @@
 (0.5)%0A    sleep(
-1
+0.2
 )%0A    m1.move(0.
@@ -636,11 +636,11 @@
 ve(-
-1.0
+0.5
 )%0A  
@@ -647,17 +647,19 @@
   sleep(
-1
+0.2
 )%0A    m1

Update motor2.py