Skip to content

Commit 0ed3d44

Browse files
committed
work on syntax
1 parent e23938a commit 0ed3d44

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/doc-plan.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
MicroCode programs consist of 5 pages, numbered 1 - 5.
2+
Execution always starts on page 1. Before execution
3+
starts, all variables are initialized to 0 and the current value of all sensors is cached.
4+
5+
A page consists of a sequence of rules, ordered from top to bottom.
6+
Each rule has a When section and a Do section.
7+
The When section specifies an event of interest
8+
and, optionally, a filter on that event.
9+
10+
When
11+
12+
page-start [timespan]
13+
timer [timespan]
14+
press [pressable-kind]
15+
release [pressable-kind]
16+
move [move-kind]
17+
sound [loud-quiet,compare]
18+
temperature [up-down,compare]
19+
light [up-down,compare]
20+
magnet [up-down,compare]
21+
radio-receive [compare]
22+
variable-X-set [compare]
23+
variable-Y-set [compare]
24+
variable-Z-set [compare]
25+
26+
Do
27+
28+
show-number [value]
29+
show-image [image*] [repeat [pos-value]]
30+
play-sound [sound*] [repeat [pos-value]]
31+
play-music [notes*] [repeat [pos-value]]
32+
radio-send [value]
33+
radio-set-group [pos-value]
34+
set-variable-X [value]
35+
set-variable-Y [value]
36+
set-variable-Z [value]
37+
switch-page [page]

0 commit comments

Comments
 (0)