Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Courses
csci206_lecture_examples
Commits
9b2d1d4f
Commit
9b2d1d4f
authored
Jan 24, 2014
by
Alan Marchiori
Browse files
lab5 in class
parent
db60981d
Changes
2
Hide whitespace changes
Inline
Side-by-side
section01/Lec05/change_lcd/change_lcd.ino
View file @
9b2d1d4f
...
...
@@ -62,13 +62,13 @@ void loop() {
lcd
.
clear
();
lcd
.
setCursor
(
0
,
0
);
//sprintf (line1, "%d.%02d", (int)amount, (int)(100*amount) % 100);
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
);
free
(
c
);
amount
+=
0.01
;
...
...
section01/Lec05/inclass/bug.c
0 → 100644
View file @
9b2d1d4f
#include <stdio.h>
#include <string.h>
int
main
(
void
)
{
char
*
str
=
"csci206"
;
int
i
=
42
;
int
*
pi
=
&
i
;
strcat
(
str
,
"is cool"
);
pi
[
5
]
=
0
;
}
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