mirror of https://github.com/noisymime/Arduino.git
Commented LCD examples.
This commit is contained in:
parent
f2ab9c6ec9
commit
ab9e945cb3
|
@ -1,9 +1,15 @@
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
|
// LiquidCrystal display with:
|
||||||
|
// rs on pin 12
|
||||||
|
// rw on pin 11
|
||||||
|
// enable on pin 10
|
||||||
|
// d0, d1, d2, d3 on pins 5, 4, 3, 2
|
||||||
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
|
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
|
// Print a message to the LCD.
|
||||||
lcd.print("hello, world!");
|
lcd.print("hello, world!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Displays text sent over the serial port (e.g. from the Serial Monitor) on
|
||||||
|
* an attached LCD.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <LiquidCrystal.h>
|
#include <LiquidCrystal.h>
|
||||||
|
|
||||||
|
// LiquidCrystal display with:
|
||||||
|
// rs on pin 12
|
||||||
|
// rw on pin 11
|
||||||
|
// enable on pin 10
|
||||||
|
// d0, d1, d2, d3 on pins 5, 4, 3, 2
|
||||||
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
|
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
|
@ -9,10 +19,15 @@ void setup()
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
|
// when characters arrive over the serial port...
|
||||||
if (Serial.available()) {
|
if (Serial.available()) {
|
||||||
|
// wait a bit for the entire message to arrive
|
||||||
delay(100);
|
delay(100);
|
||||||
|
// clear the screen
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
|
// read all the available characters
|
||||||
while (Serial.available() > 0) {
|
while (Serial.available() > 0) {
|
||||||
|
// display each character to the LCD
|
||||||
lcd.write(Serial.read());
|
lcd.write(Serial.read());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
todo.txt
4
todo.txt
|
@ -3,9 +3,9 @@
|
||||||
0012
|
0012
|
||||||
|
|
||||||
Update Windows avr-libc to 1.6 and avr-gcc to 4.3 (to match Mac).
|
Update Windows avr-libc to 1.6 and avr-gcc to 4.3 (to match Mac).
|
||||||
Comment LiquidCrystal examples.
|
|
||||||
Add Firmata library.
|
Add Firmata library.
|
||||||
Update reference.
|
[done] Comment LiquidCrystal examples.
|
||||||
|
[done] Update reference.
|
||||||
[done] Document LiquidCrystal library.
|
[done] Document LiquidCrystal library.
|
||||||
[done] Document Servo library.
|
[done] Document Servo library.
|
||||||
[done] Include actual bootloader burned on the Pro and Pro Mini.
|
[done] Include actual bootloader burned on the Pro and Pro Mini.
|
||||||
|
|
Loading…
Reference in New Issue