Add a LED in chassis (#18)

LED was equipped in the chassis. This patch turns it on.
SlowLED changes the brightness gradually. wiringpi is used for it to leverage the hardware PWA equipped by Raspberry Pi.
This commit is contained in:
Makoto Shimazu
2018-08-04 07:54:37 +09:00
committed by GitHub
parent 38690a1b0a
commit 0a438843ee
3 changed files with 75 additions and 4 deletions

View File

@@ -16,8 +16,12 @@
# limitations under the License.
from __future__ import print_function
from nazoru.led import LED_BLUE, LED_RED
from nazoru.led import LED_BLUE, LED_RED, LED_CHASSIS
import time
LED_RED.blink(1)
LED_CHASSIS.on()
time.sleep(1)
LED_CHASSIS.off()
import argparse
import os
@@ -48,6 +52,7 @@ def main():
LED_RED.off()
LED_BLUE.blink(1)
LED_CHASSIS.set_brightness(5)
print('Ready. Please input your scrrible.')
while True:
@@ -60,9 +65,11 @@ def main():
print('done.')
break
LED_CHASSIS.set_brightness(100)
LED_RED.on()
result = predictor.predict_top_n(data, 5)
LED_RED.off()
LED_CHASSIS.set_brightness(5)
print('\n=== RESULTS ===')
for item in result: