Up | 動作テスト | 作成: 2021-03-12 更新: 2021-03-18 |
(2) EasyGoPiGo3 モジュールを import
(3) EasyGoPiGo3() を gpg とおく(註1)
(4) Motor
>>> gpg.stop() >>> gpg.backward() >>> gpg.stop() >>> gpg.drive_cm(50, True) >>> gpg.drive_cm(-50, True) >>> gpg.right() >>> gpg.stop() >>> gpg.left() >>> gpg.stop()(註2) (5) LED
>>> gpg.led_off(0) >>> gpg.led_on(1) >>> gpg.led_off(1) >>> gpg.open_right_eye() >>> gpg.close_right_eye() >>> gpg.open_left_eye() >>> gpg.close_left_eye() (6) gpg をクリア
(7) Python を終了
|