mirror of
https://github.com/google/mozc-devices.git
synced 2025-11-08 16:53:28 +03:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user