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

Dependencies:   FT800_2 HYT mbed

Air flow is measured with FS7 sensor by IST-AG, humidity & temperature are measured by HYT-271 sensor by IST. Graphs displayed it TFT by Riverdi via graphical controller FFT801.

Hardware

For documentation on the FT800 library, please refer to the library pages.

Connection

MCU-board to TFT-module

MCU-board is connected to TFT-module via Break Out Board. You need 6 signals to connect: SCK, MOSI and MISO are connected to a SPI channel, SS is the chip select signal, PD work as powerdown and INT for interrupts from TFT to MCU.

/media/uploads/Ksenia/4_-22-.jpg

You have to connect VDD to BLVDD at Break Out Board if you use the board:

/media/uploads/Ksenia/4_-5-.jpg

MCU-board to HYT sensor

MCU-board is connected to sensor via I2C. Remember to use pull-up resisrors there:

/media/uploads/Ksenia/freshpaint-20-2016.09.16-10.37.03.png

MCU-board to FS7 sensor

MCU-board is connected to sensor via FS flowmodule. FS-flowmodul is a PCB implementing bridge circuit which is necessary for FS7.

https://habrastorage.org/files/b25/056/287/b250562871614b4ca4286af885f1fa24

https://habrastorage.org/files/72d/04c/cac/72d04ccac07b4fcfb436e0ffbac73066

Committer:
Ksenia
Date:
Thu Mar 16 08:58:18 2017 +0000
Revision:
0:3f440c2facb0
Initial Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Ksenia 0:3f440c2facb0 1 #include "Display.h"
Ksenia 0:3f440c2facb0 2
Ksenia 0:3f440c2facb0 3
Ksenia 0:3f440c2facb0 4 /**************************************************************************************************************************
Ksenia 0:3f440c2facb0 5 ************************** Decompress images anf fonts from pictures.h and put them to the RAM memeory of FT800 ***********
Ksenia 0:3f440c2facb0 6 **************************************************************************************************************************/
Ksenia 0:3f440c2facb0 7 void Display::LoadImagesAndFonts()
Ksenia 0:3f440c2facb0 8 {
Ksenia 0:3f440c2facb0 9 (*_TFT).WrCmd32(CMD_INFLATE);
Ksenia 0:3f440c2facb0 10 (*_TFT).WrCmd32(FONT_SET_ROBOTO_REGULAR_16);
Ksenia 0:3f440c2facb0 11 (*_TFT).WrCmdBufFromFlash(font_RobotoRegular16, sizeof(font_RobotoRegular16));
Ksenia 0:3f440c2facb0 12 }
Ksenia 0:3f440c2facb0 13
Ksenia 0:3f440c2facb0 14 /**************************************************************************************************************************
Ksenia 0:3f440c2facb0 15 ************************** Prepare images and fronts **********************************************************************
Ksenia 0:3f440c2facb0 16 **************************************************************************************************************************/
Ksenia 0:3f440c2facb0 17 void Display::HandleAllBitmaps()
Ksenia 0:3f440c2facb0 18 {
Ksenia 0:3f440c2facb0 19 // start FT800 display list
Ksenia 0:3f440c2facb0 20 StartDL();
Ksenia 0:3f440c2facb0 21
Ksenia 0:3f440c2facb0 22 (*_TFT).DL(BITMAP_HANDLE(4));
Ksenia 0:3f440c2facb0 23 (*_TFT).DL(BITMAP_SOURCE(FONT_ADDR_ROBOTO_REGULAR_16));
Ksenia 0:3f440c2facb0 24 (*_TFT).DL(BITMAP_LAYOUT(L4, 8, 20));
Ksenia 0:3f440c2facb0 25 (*_TFT).DL(BITMAP_SIZE(NEAREST, BORDER, BORDER, 16, 20));
Ksenia 0:3f440c2facb0 26
Ksenia 0:3f440c2facb0 27 (*_TFT).SetFont(4, FONT_SET_ROBOTO_REGULAR_16);
Ksenia 0:3f440c2facb0 28
Ksenia 0:3f440c2facb0 29 // finish FT800 display list
Ksenia 0:3f440c2facb0 30 FinishDL();
Ksenia 0:3f440c2facb0 31 }