Week 4

  In this week, our group worked on the ardiuno program, which could control the color and brightness of the LED lights according to the data provided by the D6T. The program is almost worked, but there are still some problems, which are needed to be solved to make this program perfect.

  We have designed out two different programs about how to present the properties of the output data on the LED matrix.

First program:
  The first program presents the changing of the temperature by comparing the temperature in each section with the average temperature of all of the sixteen temperatures.
Algorithm design:
  This program is designed base on the libaray <FastLED.h> [1].
1.Divided the 8*8 LED matrixes into 16 parts according to the corresponding detection area of D6T.
2.Put the 16 temperature data into a 4*4matrix.
3.Calacutlate the average value of the 16 temperature data, and compare the average value with that of the last group of data. If the average value is greater than the average value of the last group of data, which means there are something with high temperature comes into the detection area.
4.Compare the value of each section, if the value of the section is greater than the average value, which means something with high temperature is in this section. And the color of LED changes into red.
5.If the temperature value of the section is less than the average value, something with high temperature is not in this section. And the LED lights keep in blue.

Second program:
  In the second program, we set the temperature value interval of different color and brightness. The program reads the data from the temperature matrix and gives commands to the related LED lights by conditional judgment.
Algorithm design:
  This program is designed base on the libaray <Adafruit_NeoPixel.h> [2]. 
1.Divide the LED matrix into 16 area by finding the Mathematical relationship between the temperature matrix and the number of the LED lights.
2.Set the temperature value interval.
3.Set the brightness value interval.
4.Design the conditional statement of temperature interval.
For example, if the temperature is high in one detection area, the LED lights will change into dark red in the corresponding part. And if the temperature is low in one detection area, the LED lights will change into light blue in the corresponding part.

Evaluation and test:
  The advantage of the first program is that the change of each section can be shown more obversely. However, this program is too long, time delay is exist in this program. For the second program, the changes of temperature can not only shown by color, but also can be shown by the brightness. And the second program is shorter than the first program. Therefore we use the second program in this project.

Figure 1. Test circuit
Figure 2. Human detection
  In the next week, our group will continue work on this program to optimize it. And we will try to add a buzzer and a LCD screen to this circuit as well.

Reference:
1. [1]Fast, easy LED library for Arduino[online], Available: http://fastled.io
2. [2]Adafruit NeoPixel [online], Available: https://www.arduinolibraries.info/libraries/adafruit-neo-pixel

Comments

Popular posts from this blog

Week 5

WEEK1