Measuring air flow, relative humidity & temperature, then showing results at TFT

Dependencies:   FT800_2 HYT mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GetTouch.cpp Source File

GetTouch.cpp

00001 #include "Display.h"
00002 
00003 /*************************************************************************************************************************/
00004 
00005 void Display::GetTouch()
00006 {   
00007     pressedButton = (*_TFT).Rd8(REG_TOUCH_TAG);
00008     
00009     if (pressedButton == SHOW_HUMIDITY) {
00010         if (buttonPressedPrev != SHOW_HUMIDITY)  {
00011             showHumidity = !showHumidity;
00012         }
00013     }
00014     if (pressedButton == SHOW_FLOW) {
00015         if (buttonPressedPrev != SHOW_FLOW)  {
00016             showFlow = !showFlow;
00017         }
00018     }
00019     if (pressedButton == SHOW_TEMPERATURE) {
00020         if (buttonPressedPrev != SHOW_TEMPERATURE)  {
00021             showTemperature = !showTemperature;
00022         }
00023     }
00024     
00025     buttonPressedPrev = pressedButton;
00026 }