Button Python

Posted by PeEn
2019. 12. 28. 09:19 카테고리 없음
# -*- coding: utf-8 -*-
import RPi.GPIO as gpio
import time

switch = 17  # 버튼

# ____gipo 핀 세팅___#
gpio.cleanup()
gpio.setmode(gpio.BCM)


def Switch():
	pwm.start(default_Servo/18.0+2)
    while True:
    	switch_temp = gpio.input(switch)
        if switch_temp == False :
        	실행문