diff options
author | Cristian Maglie <c.maglie@bug.st> | 2013-08-08 16:43:19 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2013-08-08 16:43:19 +0200 |
commit | a8193ed933d9c9954cefbfb541cde56770ab5b74 (patch) | |
tree | 80796833fecca5d7426f1d09f7ac9870bab5f062 /libraries/TFT/examples/Esplora/EsploraTFTTemp | |
parent | a4c9fee673342304a5b12f7f2f7f9ecb9cb26d30 (diff) | |
parent | 5527c44aa443b20d63cf7a276180a36695233924 (diff) |
Merge branch 'ide-1.5.x-library-to-new-format' into ide-1.5.x
Diffstat (limited to 'libraries/TFT/examples/Esplora/EsploraTFTTemp')
-rw-r--r-- | libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino b/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino deleted file mode 100644 index b475d2d..0000000 --- a/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino +++ /dev/null @@ -1,64 +0,0 @@ -/* - - Esplora TFT Temperature Display - - This example for the Arduino TFT screen is for use - with an Arduino Esplora. - - This example reads the temperature of the Esplora's - on board thermisistor and displays it on an attached - LCD screen, updating every second. - - This example code is in the public domain. - - Created 15 April 2013 by Scott Fitzgerald - - http://arduino.cc/en/Tutorial/EsploraTFTTemp - - */ - -// include the necessary libraries -#include <Esplora.h> -#include <TFT.h> // Arduino LCD library -#include <SPI.h> - -char tempPrintout[3]; // array to hold the temperature data - -void setup() { - - // Put this line at the beginning of every sketch that uses the GLCD - EsploraTFT.begin(); - - // clear the screen with a black background - EsploraTFT.background(0,0,0); - - // set the text color to magenta - EsploraTFT.stroke(200,20,180); - // set the text to size 2 - EsploraTFT.setTextSize(2); - // start the text at the top left of the screen - // this text is going to remain static - EsploraTFT.text("Degrees in C :\n ",0,0); - - // set the text in the loop to size 5 - EsploraTFT.setTextSize(5); -} - -void loop() { - - // read the temperature in Celcius and store it in a String - String temperature = String(Esplora.readTemperature(DEGREES_C)); - - // convert the string to a char array - temperature.toCharArray(tempPrintout, 3); - - // set the text color to white - EsploraTFT.stroke(255,255,255); - // print the temperature one line below the static text - EsploraTFT.text(tempPrintout, 0, 30); - - delay(1000); - // erase the text for the next loop - EsploraTFT.stroke(0,0,0); - EsploraTFT.text(tempPrintout, 0, 30); -} |