Dependencies: SPI_STMPE610 SPI_TFT_ILI9341 TFT_fonts TSI mbed
TS Eyes Just like the good old X11eyes, this program follows the point where the TSI sensor of FRDM is being touched.
懐かしの X11eyes のように FRDM の TSI センサ上で 触られている点を追いかけるサンプルプログラムです。
When downloaded and reset, the eyes see the left side as the TSI read value is 0.
ダウンロードしてリセットしますと、最初は左側を見ています。
The eyes follow where you touch on the TSI sensor of FRDM board.
TSIセンサを触るとその方向に瞳が動きます。
When the right most side of the sensor is touched, the program exits the following loop and pretend to be sleeping.
指が一番右端にかかりますと、ループを抜けてお休みモードに入ります。 TFTの表面をタップすることで、起こすことができます。
Revision 1:7cc0446656ae, committed 2014-12-06
- Comitter:
- Rhyme
- Date:
- Sat Dec 06 09:54:42 2014 +0000
- Parent:
- 0:0b7a110bfceb
- Commit message:
- name changed from TS_Eye to TS_Eyes
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0b7a110bfceb -r 7cc0446656ae main.cpp --- a/main.cpp Sat Dec 06 05:35:02 2014 +0000 +++ b/main.cpp Sat Dec 06 09:54:42 2014 +0000 @@ -1,4 +1,4 @@ -/** TS_Eye TSI sample program using Adafruit 2.8" TFT with Touch +/** TS_Eyes TSI sample program using Adafruit 2.8" TFT with Touch * * @note Just like the good old X11 eyes * @note this program stares at the point where @@ -52,7 +52,7 @@ TFT.cls(); } -void moveEye(void) +void moveEyes(void) { int dx, px ; float delta = 0.0 ; @@ -69,7 +69,7 @@ TFT.set_font((unsigned char*) Arial12x12); TFT.foreground(Blue) ; TFT.locate(60, 10) ; - TFT.printf("<< TS Eye >>") ; + TFT.printf("<< TS Eyes >>") ; TFT.locate(30, 280) ; TFT.printf("Use FRDM touch slider") ; TFT.locate(30, 300) ; @@ -115,7 +115,7 @@ for(;;) { if (awake) { - moveEye() ; + moveEyes() ; awake = false ; }