创客礼物 | 这条魔法项链告诉你,气温也是有色彩的

2017-05-122万
AI 快速预览详细 收起
这款创客魔法项链是一款结合科技与艺术的创意礼物,使用Arduino控制器、温度传感器和RGB LED等硬件,能够根据环境温度变化显示不同的颜色。当气温在20℃-25℃时,呈现翡翠绿;高于25℃时,呈现珊瑚红;低于20℃时,呈现宝石蓝。制作过程包括电路搭建、上传代码和项链制作,适合零基础的新手。这款项链不仅美观,还具有科技含量,是母亲节礼物的理想选择。
母亲节又要到了
孝顺的你还在为送什么礼物而感到发愁吗

有位酷爱文艺与科技的创客妈咪
就给自己制作了一条项链

然而与普通手工艺品不同的是
它不仅能做配饰与各种衣服百搭
还能实时感知气温并变幻出不同的颜色

当气温较为凉爽时(20℃-25℃),呈现翡翠绿;
当气温相对较热时(高于25℃),呈现珊瑚红;
当气温相对较冷时(低于25℃),呈现宝石蓝;

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图1

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图2

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图3

梦幻的颜色配合复古的吊坠
美的不像真的!

怎么做到的?
▼▼▼

教程专区

材料清单(*部分硬件来自Lilypad Kit)
Arduino控制器、温度传感器、RGB LED、鳄鱼夹,剥线钳、装饰项链,毛毡,针线、剪刀、热熔胶枪等

制作过程
1.电路搭建;可先用鳄鱼夹搭建整个电路进行测试,具体连接方式如下图所示:
创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图4

2.上传代码
[mw_shl_code=applescript,true]  /*
* This program shows different light colors according to the current ambient temperature:
* It gives a green color to indicate the cool weather (68 to 78 degrees Fahrenheit).
* A red color is shown when the weather is relatively hot (above 78 degrees Fahrenheit)
* and a blue one to represent the cold weather (below 68 Fahrenheit).
*
* Written by Tahani Almanie
*/

int tempSenPin = A2; // Temperature sensor connected to analog pin A2
int tempReading;    // This variable for the sensor reading
float voltage;      // This variable for the voltage value of the sensor
float tempC;         // This variable for the Centigrade temperature
float tempF;         // This variable for the Fahrenheit temperature

int redPin = 9;     // R on RGB LED connected to digital pin 9
int greenPin = 11;  // G on RGB LED connected to digital pin 11
int bluePin = 10;   // B on RGB LED connected to digital pin 10

void setup()
{
    Serial.begin(9600);  //Start the serial connection to view the sensor readings
}

void loop()
{
   //getting the reading from the temperature sensor
   tempReading = analogRead(tempSenPin);

   // converting that reading to voltage
   voltage = tempReading * 4.15 / 1024.0;
   // print out the voltage
   Serial.print(voltage); Serial.println(" volts");
   
   // converting that voltage to Centigrade temperature
   tempC = (voltage - 0.5) * 100 ;
   // print out the Centigrade temperature                                             
   Serial.print(tempC); Serial.println(" degrees C");
   
   // converting Centigrade to Fahrenheit
   tempF = (tempC * 9.0 / 5.0) + 32.0;
   // print out the Fahrenheit temperature
   Serial.print(tempF); Serial.println(" degrees F");

   //waiting 1 second
   delay(1000);

   lightColor();
}

void lightColor()   
{
         if (tempF >= 78 )              //hot ambient gives a red light
            generateColor(255,0,0);      

         else if (tempF>=68 && tempF<78)//nice ambient gives a green light
            generateColor(0,255,0);        

         else                           //cold ambient gives a blue light
            generateColor(0,0,255);            
}  

void generateColor(int red, int green, int blue)
{  
         analogWrite(redPin, 255-red);   
         analogWrite(greenPin, 255-green);  
         analogWrite(bluePin, 255-blue);   
}[/mw_shl_code]
3.项链制作
准备所有材料和工具。
创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图5

将导线螺旋编织并穿过项链。
创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图8

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图9

电源固定在主控器的背面,连接控制器和温度传感器各端口的导线。

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图11

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图12

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图13

剪几个大小合适的圆片,用针线将其缝成口袋,然后把控制器、温度传感器裹起来。

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图6

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图7

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图14

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图15

把导线另一侧的RGB LED模块放入吊坠内部。

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图10

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图16

也可以在吊坠内部用圆片遮挡,这样LED光线显得不那么刺眼。

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图17

把吊坠合上,作品完工。

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图18

创客礼物 | 这条魔法项链告诉你,气温也是有色彩的图19



怎么样,你心动了吗?
如此又唯美又有科技含量的项链
制作工艺也不复杂
赶紧给母上大人也制作一条吧






创作许可协议

本项目采用 None(不开放任何权利,保留所有权利) 进行许可。

评论(5)
willwii3373
willwii3373
厉害了 成品 好漂亮啊
lollypopyoung
lollypopyoung
目前有一个Adafruit 1222,串口比较少,想利用起来。求具体的电路搭建方法~~~谢谢~
许培享
许培享
渐变色,呼吸灯等都符合生物美,看着让人宁静。
可缝制水洗或按扣随取随安 灵活。
sophie
sophie
作者
回复许培享
很好的建议!
许培享
许培享
什么样的导线适合??
sophie
sophie
作者
回复许培享
其实没有特别要求,感觉只要编织的好看就行了
dsweiliang
dsweiliang
后面那坨藏在哪里好?
sophie
sophie
作者
回复dsweiliang
在衣服后面缝个口袋吧;P
- 没有更多了 -