質問編集履歴

1

誤字脱字の訂正

2021/11/10 04:09

投稿

crpmanz
crpmanz

スコア5

test CHANGED
File without changes
test CHANGED
@@ -78,13 +78,7 @@
78
78
 
79
79
  GPIO.setmode(GPIO.BCM)
80
80
 
81
- GPIO.setup(4, GPIO.OUT)
82
-
83
81
  GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
84
-
85
-
86
-
87
-
88
82
 
89
83
 
90
84
 
@@ -94,15 +88,11 @@
94
88
 
95
89
  if GPIO.input(17) == GPIO.HIGH:
96
90
 
97
- text = 'HIGH'
91
+ text = 'ON'
98
-
99
- GPIO.output(4, GPIO.HIGH)
100
92
 
101
93
  else:
102
94
 
103
- text = 'LOW'
95
+ text = 'OFF'
104
-
105
- GPIO.output(4, GPIO.LOW)
106
96
 
107
97
  return render_template('index.html',message=test)
108
98