###前提・実現したいこと
RaspberryPi 3 modelBのPython2.7にてMegaPiのプラグラムをRunしたところ「The program is still running」といったエラー文が出てきました。このエラーを出ないようにしたいのが質問です。
###使用したソースコード
from Megapi import * bot = MegaPi() bot.start('/dev/ttyUSB0') bot.stepperMotorRun(1,300) exit()
###表示されたエラー文
the program is still running do you want to kill it
###試したこと
from megapi import *だけで起動してもエラーが出ました。
以上。よろしくお願いします
###追記
ソースコードのexit()を消し、コンソールで実行したとき以下のエラー分が出ました
init MegaPi <megapi.mSerial instance at 0x767e8dc8> Traceback (most recent call last): File "imp.py", line 5, in <module> bot.start() File "/usr/local/lib/python2.7/dist-packages/megapi.py", line 83, in start self.device.start(port) File "/usr/local/lib/python2.7/dist-packages/megapi.py", line 15, in start self.ser = serial.Serial(port,115200,timeout=10) File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 261, in __init__ self.open() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 278, in open raise SerialException("could not open port %s: %s" % (self._port, msg)) serial.serialutil.SerialException: could not open port /dev/ttyAMA0: [Errno 13] Permission denied: '/dev/ttyAMA0'
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/01/30 07:52
2018/01/30 08:06
2018/01/30 08:17
2018/01/30 08:29
2018/01/30 08:41
2018/01/30 08:50
2018/01/30 09:00