Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Courses
csci206_lecture_examples
Commits
da806791
Commit
da806791
authored
Jan 24, 2014
by
Alan Marchiori
Browse files
Merge branch 'master' of gitlab.bucknell.edu:courses/csci206_lecture_examples
parents
72baf597
689a7b44
Changes
1
Hide whitespace changes
Inline
Side-by-side
section01/Lec05/change_lcd/change_lcd.ino
View file @
da806791
...
@@ -57,16 +57,20 @@ void loop() {
...
@@ -57,16 +57,20 @@ void loop() {
char
line1
[
30
],
line2
[
30
];
char
line1
[
30
],
line2
[
30
];
struct
change
*
c
=
make_change
(
amount
);
struct
change
*
c
=
make_change
(
amount
);
amount
+=
0.01
;
sprint_change
(
line1
,
line2
,
c
);
sprint_change
(
line1
,
line2
,
c
);
lcd
.
clear
();
lcd
.
clear
();
lcd
.
setCursor
(
0
,
0
);
lcd
.
setCursor
(
0
,
0
);
//sprintf (line1, "%d.%02d", (int)amount, (int)(100*amount) % 100);
lcd
.
write
(
line1
);
lcd
.
write
(
line1
);
lcd
.
setCursor
(
0
,
1
);
lcd
.
setCursor
(
0
,
1
);
//sprintf (line2, "%d, %d, %d, %d", c->quarters, c->dimes, c->nickels, c->pennies);
lcd
.
write
(
line2
);
lcd
.
write
(
line2
);
free
(
c
);
free
(
c
);
amount
+=
0.01
;
delay
(
500
);
delay
(
500
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment