Add a new example to show how serial monitor can be used
This commit is contained in:
parent
6f326e6e26
commit
861d2ff72f
3 changed files with 16 additions and 3 deletions
|
@ -3,9 +3,7 @@ the different usage patterns
|
||||||
|
|
||||||
- BlinkInAVRC - Shows how to use plain AVR C code
|
- BlinkInAVRC - Shows how to use plain AVR C code
|
||||||
- ATtinyBlink - Shows how to use different cores like ATtiny
|
- ATtinyBlink - Shows how to use different cores like ATtiny
|
||||||
|
|
||||||
These three examples are a step back, in the "tests" directory.
|
|
||||||
|
|
||||||
- Blink - Shows normal usage
|
- Blink - Shows normal usage
|
||||||
- HelloWorld - Shows how to include Arduino libraries
|
- HelloWorld - Shows how to include Arduino libraries
|
||||||
|
- SerialPrint - Shows how serial monitor can be used
|
||||||
- BlinkChipKIT - Shows how to use ChipKIT
|
- BlinkChipKIT - Shows how to use ChipKIT
|
||||||
|
|
5
examples/SerialPrint/Makefile
Normal file
5
examples/SerialPrint/Makefile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Arduino Make file. Refer to https://github.com/sudar/Arduino-Makefile
|
||||||
|
|
||||||
|
BOARD_TAG = uno
|
||||||
|
|
||||||
|
include ../../Arduino.mk
|
10
examples/SerialPrint/SerialPrint.ino
Normal file
10
examples/SerialPrint/SerialPrint.ino
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(9600);
|
||||||
|
Serial.print("Press any key: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
if (Serial.available()) {
|
||||||
|
Serial.println(Serial.read());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue