接続例 WebIOPiのインストール Raspberry Pi にWebIOPiをインストールしてない場合は、まず、WebIOPiをインストールします。 WebIOPiのインストール スクリプトファイルの作成 「/home/pi/work/webiopi」フォルダに、「motordriver.py」というファイル名で、以下の内容のスクリプトファイルを作成します。 import webiopi GPIO = webiopi.GPIO def MotorDrive( iIn1Pin, iIn2Pin, motor ): if 5 > motor and -5 < motor: GPIO.pwmWrite( iIn1Pin, 0.0 ) GPIO.pwmWrite( iIn2Pin, 0.0 ) elif 0 < motor: GPIO.pwmWrite( iIn1Pin, motor * 0.