#every time we check if the buttons are pressed
onevent buttons

if button.forward==1 then
    motor.left.target=200 
    motor.right.target=200 
end

if button.center==1 then 
    motor.left.target=0 
    motor.right.target=0 
end

if button.backward==1 then 
    motor.left.target=-200 
    motor.right.target=-200 
end

if button.left==1 then 
    motor.left.target=-200 
    motor.right.target=200 
end

if button.right==1 then 
    motor.left.target=200 
    motor.right.target=-200
end