File tree Expand file tree Collapse file tree 1 file changed +40
-13
lines changed Expand file tree Collapse file tree 1 file changed +40
-13
lines changed Original file line number Diff line number Diff line change @@ -3,36 +3,69 @@ Execution always starts on page 1. Before execution
33starts, all variables are initialized to 0 and
44the current value of all sensors is cached.
55
6- A page consists of a sequence of rules (R), ordered from top to bottom.
6+ A page consists of a sequence of rules (R):
7+
8+ P := page-D R\*
9+
710Each rule has an option when section W and an optional do section D.
11+
12+ R := when [ W] do [ D]
13+
814The when section specifies an event of interest
915and, optionally, a filter on that event.
1016The do section specifies an action and, optionally,
1117parameters to that action.
1218Some actions can be repeated.
1319
14- R := [ W] [ D]
15-
1620W :=
1721| page-start [ TS]
1822| timer [ TS]
1923| press [ PK]
2024| release [ PK]
2125| move [ MK]
2226| sound [ loud | quiet | C]
23- | temperature [ up | down | C]
24- | light [ up | down | C]
25- | magnet [ up | down | C]
27+ | temperature [ UD | C]
28+ | light [ UD | C]
29+ | magnet [ UD | C]
2630| radio-receive [ C]
2731| variable-X-set [ C]
2832| variable-Y-set [ C]
2933| variable-Z-set [ C]
3034
35+ UD := up | down
3136TS := (1/4-second | 1-second | 1-random-second | 5-seconds)\*
3237PK := button-A | button-B | logo | pin-0 | pin-1 | pin-2
3338MK := shake | tilt-left | tilt-right | ...
39+
3440C := CO V
3541
42+ CO :=
43+ | equals
44+ | not-equals
45+ | less-then
46+ | less-then-or-equal
47+ | greater-than
48+ | greater-than-or-equal
49+
50+ V :=
51+ | A
52+ | A + V
53+ | A / V
54+ | A - V
55+ | A \* V
56+ | random PV
57+
58+ A :=
59+ | <float >
60+ | var-X | var-Y | var-Z
61+ | light-value | sound-value | temp-value | magnet-value
62+ | radio-value
63+
64+ PV :=
65+ | int>0
66+ | int>0 + PV
67+ | int>0 \* PV
68+
3669D :=
3770| show-number [ V]
3871| show-image (image)_ [ repeat [ PV]]
4578| set-variable-Z [ V]
4679| switch-page [ PG]
4780
48- CO :=
49- | equals
50- | not-equals
51- | less-then
52- | less-then-or-equal
53- | greater-than
54- | greater-than-or-equal
81+ PG := | page-1 | page-2 | page-3 | page-4 | page-5
You can’t perform that action at this time.
0 commit comments