diff --git a/morse/lib/morse_signaler.ex b/morse/lib/morse_signaler.ex index 3326858..0137773 100644 --- a/morse/lib/morse_signaler.ex +++ b/morse/lib/morse_signaler.ex @@ -20,10 +20,10 @@ defmodule MorseSignaler do """ def signal(server_pid) do - # {:ok, gpio} = GPIO.open(relay_pin(), :output) - # GPIO.write(gpio, @off) + {:ok, gpio} = GPIO.open(relay_pin(), :output) + GPIO.write(gpio, @off) Process.sleep(@sleep_start) - # signal_sentence(gpio, String.graphemes(secret_code())) + signal_sentence(gpio, String.graphemes(secret_code())) GenServer.cast(server_pid, :done) :ok diff --git a/ui/lib/ui_web/templates/page/morse.html.eex b/ui/lib/ui_web/templates/page/morse.html.eex index bac0db5..42c2d47 100644 --- a/ui/lib/ui_web/templates/page/morse.html.eex +++ b/ui/lib/ui_web/templates/page/morse.html.eex @@ -33,9 +33,6 @@ responseP.innerHTML = "Starting..."; xhttp.open("GET", "/start", true); xhttp.send(); - setTimeout(function() { - responseP.innerHTML = "Started."; - }, 3000); } function givehint() {