Last change
on this file since 136 was 136, checked in by ertl-honda, 8 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
588 bytes
|
Rev | Line | |
---|
[136] | 1 | /*
|
---|
| 2 | LCD Debug Print
|
---|
| 3 |
|
---|
| 4 | Use the Robot's library function debugPrint() to
|
---|
| 5 | quickly send a sensor reading to the robot's creen.
|
---|
| 6 |
|
---|
| 7 | Circuit:
|
---|
| 8 | * Arduino Robot
|
---|
| 9 |
|
---|
| 10 | created 1 May 2013
|
---|
| 11 | by X. Yang
|
---|
| 12 | modified 12 May 2013
|
---|
| 13 | by D. Cuartielles
|
---|
| 14 |
|
---|
| 15 | This example is in the public domain
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | #include <ArduinoRobot.h>
|
---|
| 19 | #include <Wire.h>
|
---|
| 20 | #include <SPI.h>
|
---|
| 21 |
|
---|
| 22 | int value;
|
---|
| 23 |
|
---|
| 24 | void setup() {
|
---|
| 25 | // initialize the robot
|
---|
| 26 | Robot.begin();
|
---|
| 27 |
|
---|
| 28 | // initialize the screen
|
---|
| 29 | Robot.beginTFT();
|
---|
| 30 | }
|
---|
| 31 | void loop() {
|
---|
| 32 | // read a value
|
---|
| 33 | value = analogRead(A4);
|
---|
| 34 |
|
---|
| 35 | // send the value to the screen
|
---|
| 36 | Robot.debugPrint(value);
|
---|
| 37 |
|
---|
| 38 | delay(40);
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.