最好的电子音响科技diy制作网站

haoDIY_音响电子电脑科技DIY小制作发明

发光云

时间:2017-05-22 21:44来源:未知 作者:admin 点击:
这是我在著名的Pinterest照亮云带修补更加丰富多彩! 使用的材料: Pillow -填料 细棒 Adafruit Gemma(或微控制器的选择) -集成驱动LED Adafruit neopixel环- 16 x 5050的RGB - Adafruit 3xaaa电池座W /开/关 -聚苯乙烯球 清除线程/钓鱼线 - exacto刀 热胶
发光云

这是我在著名的Pinterest照亮云带修补更加丰富多彩!

使用的材料:

Pillow -填料

细棒

Adafruit Gemma(或微控制器的选择)

-集成驱动LED Adafruit neopixel环- 16 x 5050的RGB

- Adafruit 3xaaa电池座W /开/关

-聚苯乙烯球

清除线程/钓鱼线

- exacto刀

热胶棒

热胶枪

-粘合剂粘

- 22awg实芯线

•烙铁焊锡

步骤1:在neopixel环焊Gemma

发光云

从neopixel环芽孢的连接如下:

VCC:VOUT

在:A1

接地:接地

步骤2:安全杰玛和塑料球的neopixel环

发光云

剪了一个凹痕,适合杰玛和neopixel环放进塑料球粘下来。

步骤3:刺插进泡沫球

发光云

这将有助于堆栈的棉花球给云“毛茸茸的外表”。

把胶棒上的交叉和球确保棒不会脱落后。

步骤4:为Fit Snuggly Into电池破了一个洞

发光云

安全的电池放入发泡胶球然后用粘合剂粘到锁在!

步骤5:开始你的云的形状!

发光云

粘上枕头填料在塑料球直到棒完全覆盖。

这是试验和错误的过程!

步骤6:上传你的代码的云:)

发光云

这里从Adafruit neopixel库添加到Arduino IDE:

Adafruit库安装

上传的文件上传到你flufflycloudtiny Arduino贝娄吉马一个彩虹效果灯。

*如果代码不能编译的文件在我的GitHub的尝试:点击这里

#include <Adafruit_NeoPixel.h>

#define PIN 1

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
 
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(100, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 100, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 100), 50); // Blue

  rainbow(20);
  rainbowCycle(20);
 
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
 strip.setPixelColor(i, c);
 strip.show();
 delay(wait); 

  } 
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++){ 

strip.setPixelColor(i,Wheel((i+j) & 255));
 } 

strip.show();
delay(wait);
 }

}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

 for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
 
  • 发光云fluffycloudtiny.ino
    下载

步骤7:挂上发光的云

发光云

把钓线一根,用热胶固定结。

得到一个图钉把它挂在哪里!


(责任编辑:admin)
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
相关文章
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片