diff --git a/ui/main/views.py b/ui/main/views.py index be8770c..c1d3996 100644 --- a/ui/main/views.py +++ b/ui/main/views.py @@ -26,7 +26,7 @@ def home(request): def take_photo(request): - capture_image("/tmp/static/photo.jpg") + pin_control.capture_image("/tmp/static/photo.jpg") return HttpResponse("Ok") @@ -40,11 +40,13 @@ def led(request, led): return HttpResponse("Ok") def turn_off_all(): - print("TURN OFF ALL") + for pin in leds_gpio.values(): + pin_control.turn_on_pin(pin) return HttpResponse("Ok") def turn_on_all(): - print("TURN ON ALL") + for pin in leds_gpio.values(): + pin_control.turn_off_pin(pin) return HttpResponse("Ok") def toggle_led(led, turn_on):