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

Revision:
0:3f440c2facb0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TFT/UpdateDataToDraw.cpp	Thu Mar 16 08:58:18 2017 +0000
@@ -0,0 +1,23 @@
+#include "Display.h"
+
+/*************************************************************************************************************************/
+void Display::UpdateDataToDraw(uint8_t humidity, int8_t temperature, float flow)
+{        
+    if (current_X >= POINTS_NUMBER) {
+        current_X = 0;
+    } else {
+        current_X ++;
+    }
+    
+    flow_Y[current_X] = flow * 20;
+    humidity_Y[current_X] = humidity * 2;
+    temperature_Y[current_X] = (temperature + 10) * 4;
+    
+    flow_Y[current_X] = flow_Y[current_X] + Y_BOTTOM_OFFSET;
+    humidity_Y[current_X] = humidity_Y[current_X] + Y_BOTTOM_OFFSET;
+    temperature_Y[current_X] = temperature_Y[current_X] + Y_BOTTOM_OFFSET;
+    
+    CreateStringHumidity(humidityStr, humidity);
+    CreateStringFlow(flowStr, flow);
+    CreateStringTemperature(temperatureStr, temperature);
+}