HYT humidity & temp sensor polling / showing received data at TFT with capacitive touchscreen

Dependencies:   FT800_2 HYT mbed

HYT humidity & temperature sensor: polling and showing data at TFT via graphical controller FT800/FT801.

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

Подробнее в статьях Как перестать бояться и полюбить mbed [Часть 1 - 5] на https://habrahabr.ru/users/uuuulala/topics/

Revision:
0:5d3131d1b142
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TFT/display.Draw_AboutSensor.cpp	Fri Oct 07 11:08:19 2016 +0000
@@ -0,0 +1,38 @@
+#include "display.h"
+
+/**************************************************************************************************************************
+************************** Display text & image about the HYT sensor ******************************************************
+**************************************************************************************************************************/
+void Display::AboutSensor()
+{
+    // start FT800 display list
+    StartDL();
+
+    // Write text
+    (*_TFT).DL(COLOR_RGB(0, 0, 0));
+    (*_TFT).DL(BEGIN(LINES));
+    (*_TFT).DL(LINE_WIDTH(8));
+    (*_TFT).DL(VERTEX2II(14, 79, 0, 0));
+    (*_TFT).DL(VERTEX2II(14, 220, 0, 0));
+    (*_TFT).Text(24, 78, 27, 0, "Capacitive polymer humidity sensor with I2C interface");
+    (*_TFT).DL(COLOR_RGB(9, 0, 63));
+    (*_TFT).Text(24, 115, 26, 0, "Measuring range: 0 .. 100% rH,  -40 .. 125 C");
+    (*_TFT).Text(24, 135, 26, 0, "Accuracy: +/-1.8% rH (0 .. 80% rH),");
+    (*_TFT).Text(88, 155, 26, 0, "+/-0.2 C (0 .. 60 C)");
+    (*_TFT).Text(24, 175, 26, 0, "Response time: < 4 sec");
+    (*_TFT).Text(24, 195, 26, 0, "Operating voltage: 2.7 to 5.5 V");
+    (*_TFT).DL(COLOR_RGB(0, 0, 0));
+    (*_TFT).Text(11, 15, 30, 0, "HYT-271 sensor from IST");
+
+    // Show photo
+    (*_TFT).DL(COLOR_RGB(255, 255, 255));
+    (*_TFT).DL(BEGIN(BITMAPS));
+    (*_TFT).DL(VERTEX2II(360, 140, 2, 0));
+    (*_TFT).DL(END());
+
+    // create link to main menu 
+    MainMenuReference();
+    
+    // finish FT800 display list
+    FinishDL();
+}