[SIMPLE PROGRAM] HYT humidity & temp sensor polling / showing received data at TFT with capacitive touchscreen

Dependencies:   FT800_2 HYT mbed

HYT humidity and temperature sensor polling & showing received 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/

TFT/display.Calibration.cpp

Committer:
Ksenia
Date:
2016-10-05
Revision:
1:e20b5da0c912
Parent:
0:1f5444f2977d

File content as of revision 1:e20b5da0c912:

#include "display.h"

/**************************************************************************************************************************
************************** Put calibration data to FT800 ******************************************************************
**************************************************************************************************************************/
void Display::Calibration()
{   
    char calibration[25] = {98, 99, 0, 0, 182, 254, 255, 255, 245, 142, 248, 255, 117, 254, 255, 255, 34, 98, 0, 0, 123, 154, 248, 255};
    for (int i = 0; i < 24; i++) {
        (*_TFT).Wr8(REG_TOUCH_TRANSFORM_A + i, calibration[i]);
    }
}