“Thermo Cup”的版本间的差异
(Created page with "{{Language| Thermo Cup}} {| style="width: 800px;" |- | ==Objective== This cup can "sense" water temperature and present light based on program setting with different color. [...") |
(→Hardware Buildup) |
||
第82行: | 第82行: | ||
*Setup 2:Connect the activated battery box with BM module. | *Setup 2:Connect the activated battery box with BM module. | ||
[[File:CoreUSB_Ble_steup2.jpg|600px|center]] | [[File:CoreUSB_Ble_steup2.jpg|600px|center]] | ||
− | *Setup 3:Stack all modules without fixed order and finish | + | *Setup 3:Stack all modules without fixed order and finish circuit buildup. |
[[File: ThermoCup_steup3.jpg|600px|center]] | [[File: ThermoCup_steup3.jpg|600px|center]] | ||
2015年10月20日 (二) 06:44的版本
Language | English |
---|
目录ObjectiveThis cup can "sense" water temperature and present light based on program setting with different color. PrincipleTemperature and humidity sensor detects environment temperature and humidity and make light present different color in different sections. Equipment
Load the Code
Code Debugging
void readByAM2321()
{
AM2321 am2321;
am2321.read();
sensor_tem = am2321.temperature / 10.0;
Serial.println(sensor_tem);
delay(100);
}
#define temp1 28
#define temp2 30
#define temp3 32
if (sensor_tem <= temp1)
colorSet(strip.Color(0, 255, 0));
else if (sensor_tem > temp1 && sensor_tem <= temp2)
colorSet(strip.Color(0, 0, 255));
else if (sensor_tem > temp2 && sensor_tem <= temp3)
colorSet(strip.Color(255, 255, 0));
else
colorSet(strip.Color(255, 0, 0));
RGB value is method of defining light color. R(Red), G(Green) and B(Blue) are the three primary colors, whose values is 0-225. The value represents color intensity. Three different kinds of light can be superimposed together to form a variety of colors, such as (0, 225), that is green. Hardware Buildup
ResultThe sensor detects different temperature data. You can also build a beautiful shell with LEGO. Video |