Hello
I have written a Python subroutine with which I control over the Raspberry pi the Megapi. Something like this works.
If I want to quit the program I do not come back from the terminal and the motors sum easily.
What am I doing wrong?
from megapi import *
bot = MegaPi()
bot.start()
sleep(1);
def setMotorLeft(power):
bot.encoderMotorRun(2,power);
def setMotorRight(power):
bot.encoderMotorRun(2,power);
def exit():
bot.encoderMotorRun(1,0);
bot.encoderMotorRun(2,0);
bot.close()
bot.exit()