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
eb544cda
Commit
eb544cda
authored
Jan 24, 2014
by
Alan Marchiori
Browse files
added arduino sketch
parent
4f38c552
Changes
1
Hide whitespace changes
Inline
Side-by-side
section01/Lec05/hello_lcd_c.ino
0 → 100644
View file @
eb544cda
#include <LiquidCrystal.h>
#include <stdio.h>
static
FILE
uartout
=
{
0
};
LiquidCrystal
lcd
(
8
,
9
,
4
,
5
,
6
,
7
);
static
int
uart_putchar
(
char
c
,
FILE
*
stream
)
{
Serial
.
write
(
c
);
return
0
;
}
void
setup
()
{
// put your setup code here, to run once:
Serial
.
begin
(
9600
);
fdev_setup_stream
(
&
uartout
,
uart_putchar
,
NULL
,
_FDEV_SETUP_WRITE
);
stdout
=
&
uartout
;
printf
(
"startup
\n
"
);
lcd
.
begin
(
16
,
2
);
lcd
.
setCursor
(
0
,
0
);
lcd
.
write
(
"hello"
);
}
void
loop
()
{
// put your main code here, to run repeatedly:
printf
(
"hello
\n
"
);
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