Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
a94c594b
Commit
a94c594b
authored
6 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
maj puzzle arduino
parent
68d82a42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arduino/led_puzzle/led.lus
+14
-14
14 additions, 14 deletions
arduino/led_puzzle/led.lus
with
14 additions
and
14 deletions
arduino/led_puzzle/led.lus
+
14
−
14
View file @
a94c594b
...
...
@@ -49,11 +49,11 @@ let
tel
const
led1_0
=
Eteint
;
const
led2_0
=
Allume
;
const
led3_0
=
Eteint
;
const
led4_0
=
Allume
;
const
led5_0
=
Eteint
;
const
led1_0
00
=
Eteint
;
const
led2_0
00
=
Allume
;
const
led3_0
00
=
Eteint
;
const
led4_0
00
=
Allume
;
const
led5_0
00
=
Eteint
;
----------------------------------------------------------------------------
-- blue => permutation circulaire
-- red => inverse une led qui circule a chaque pression de boutons
...
...
@@ -72,15 +72,15 @@ let
)
else
(
pre
X1
,
pre
X2
,
pre
X3
,
pre
X4
,
pre
X5
);
led1
=
led1_0
->
if
blue
then
pre
(
led5
)
else
led1
=
led1_0
00
->
if
blue
then
pre
(
led5
)
else
if
red
and
X1
then
not
(
pre
(
led1
))
else
pre
(
led1
);
led2
=
led2_0
->
if
blue
then
pre
(
led1
)
else
led2
=
led2_0
00
->
if
blue
then
pre
(
led1
)
else
if
red
and
X2
then
not
(
pre
(
led2
))
else
pre
(
led2
);
led3
=
led3_0
->
if
blue
then
pre
(
led2
)
else
led3
=
led3_0
00
->
if
blue
then
pre
(
led2
)
else
if
red
and
X3
then
not
(
pre
(
led3
))
else
pre
(
led3
);
led4
=
led4_0
->
if
blue
then
pre
(
led3
)
else
led4
=
led4_0
00
->
if
blue
then
pre
(
led3
)
else
if
red
and
X4
then
not
(
pre
(
led4
))
else
pre
(
led4
);
led5
=
led5_0
->
if
blue
then
pre
(
led4
)
else
led5
=
led5_0
00
->
if
blue
then
pre
(
led4
)
else
if
red
and
X5
then
not
(
pre
(
led5
))
else
pre
(
led5
);
tel
...
...
@@ -130,11 +130,11 @@ tel
-- red => la led courante devient le and des leds autours
-- la led courante est le premiere au debut, puis la deuxieme, etc.
const
led1_p5
=
F
;
const
led1_p5
=
T
;
const
led2_p5
=
F
;
const
led3_p5
=
F
;
const
led4_p5
=
T
;
const
led5_p5
=
F
;
const
led3_p5
=
T
;
const
led4_p5
=
F
;
const
led5_p5
=
T
;
node
puzzle5
(
red
,
blue
:
bool
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment