allenlee820202 / gpioModule

gpioModule

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gpioModule

PIR sensor

P18 (BCM) as the input of PIR sensor

from PIR import PIR_t
import time

PIR_t(18)  
while(True):
  time.sleep(10)

Stepper motor

P16, P20, P21, P26 as the pin1, pin2, pin3 and pin4 of stepper motor

from stepperMotor import StepperMotor_t
import time

motor = StepperMotor_t()
while(True):
      time.sleep(5)
      motor.start()
      time.sleep(5)
      motor.stop()

About

gpioModule

License:Apache License 2.0


Languages

Language:Python 100.0%