Skip to content
Ulf edited this page Jul 8, 2014 · 12 revisions

Rule:

fun(Pid, Name, Body) -> case Body of "off" -> ok; "on" -> sensor:send([], Name, "on"),
sensor:send_after(Pid, Name, 20000, "off"); _ -> ok end end.

Clone this wiki locally