女人自慰AV免费观看内涵网,日韩国产剧情在线观看网址,神马电影网特片网,最新一级电影欧美,在线观看亚洲欧美日韩,黄色视频在线播放免费观看,ABO涨奶期羡澄,第一导航fulione,美女主播操b

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

如何給尤克里里琴添加LED燈光效果

454398 ? 來(lái)源:工程師吳畏 ? 2019-08-20 10:38 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

第1步:材料

如何給尤克里里琴添加LED燈光效果

結(jié)構(gòu)材料:

DIY ukelele安裝套件(可能是另一種不同的套件)由以下組成:

1- Body。

2-neck。

3-Saddle

4-Rope Support

5-Bridge

6-String nut 。

7-機(jī)頭固定環(huán)(x4)。

8機(jī)頭(x4)。

9-機(jī)頭安裝螺絲(x8)用于機(jī)橋(x2)的10個(gè)安裝螺釘。

11-用于橋接安裝螺釘(x2)的蓋帽。

12弦( x4)。

電子資料

NANO Arduino

Leds輪WS2812。

加速度計(jì)BMA220(可選)。

電池連接器。

9V電池。

轉(zhuǎn)移。

其他

木器清漆。

魔術(shù)貼。

焊錫。

用于上漆的保護(hù)性塑料。

熱熔硅膠。

工具:

激光雕刻。

砂紙

星形螺絲刀。

畫(huà)筆。

熱熔槍。

錫烙鐵。

第2步:自定義尤克里里琴

為了使我們的夏威夷四弦琴成型,我們可以在身體上用激光切割機(jī)雕刻圖紙。在沒(méi)有該工具的情況下,我們可以繪制它。

我們選擇的圖片是第一個(gè)出現(xiàn)的圖片。

首先,我們必須設(shè)計(jì)繪圖模板來(lái)進(jìn)行雕刻。

為了實(shí)現(xiàn)這一點(diǎn),我們將使用一個(gè)名為“Inkscape”的軟件,我們可以從這個(gè)鏈接獲得:https://inkscape.org/es/descargas/。

使用它,我們必須調(diào)整我們想要使用的圖片,就像我們?cè)诘诙垐D片中顯示的那樣。您可以看到我們已經(jīng)旋轉(zhuǎn)了初始圖像,可以用儀器的圓圈調(diào)整手的cicle。就像我們之前說(shuō)的那樣,你可以放任何圖像。

第3步:使用Inkscape對(duì)圖像進(jìn)行矢量化

我們將看到如何從像素圖創(chuàng)建矢量文件(jpg,png,Inkscape可以打開(kāi)的任何柵格格式)。

Inkscape Inkscape是一個(gè)開(kāi)源矢量圖形編輯器,正如標(biāo)題所暗示的,這是我將用來(lái)矢量化徽標(biāo)的工具。矢量化步驟這些步驟對(duì)于我們可能想要進(jìn)行的任何矢量化都是常見(jiàn)的。

在Inkscape中打開(kāi)圖像

打開(kāi)跟蹤位圖工具路徑 - 》跟蹤位圖

圍繞跟蹤位圖選項(xiàng)進(jìn)行游戲

運(yùn)行跟蹤

清理結(jié)果(如有必要)

注意“游戲”部分。我不是追蹤專(zhuān)家,所以我把這個(gè)工具當(dāng)作一個(gè)帶旋鈕和燈光的黑盒子,扭曲和改變直到我得到最好的結(jié)果

第4步:徽標(biāo)雕刻

為此,重要的是要有一個(gè)表面的輪廓,其上的雕刻將制作。

為了制作雕刻,我們將使用‘T2Laser’軟件。我們可以從以下網(wǎng)站獲取此軟件:http://descargar.cnet.com/windows/t2-laser/3260-2.。.

一旦我們打開(kāi)軟件,我們必須加載圖像我們?cè)谧詈笠徊絼?chuàng)建了。然后,按“控制激光”按鈕,出現(xiàn)cnc控件。

兩張照片顯示了我們激光切割機(jī)雕刻的過(guò)程和結(jié)果。

步驟5:打磨和上漆

為了讓我們的夏威夷四弦琴明亮,并且沒(méi)有粗糙的層,我們可以順利地打磨構(gòu)成我們樂(lè)器的兩個(gè)部分,因?yàn)槲覀兛赡軙?huì)損壞已經(jīng)制作的圖紙(如果您選擇繪制尤克里里琴,則必須先將其打磨)。然后我們將清漆我們的兩個(gè)部分,使它們獲得更深的顏色,木材呈現(xiàn)出更大的阻力。我們可以使用普通的木材清漆,它不需要特殊。

一旦我們有清漆,我們將它與少量溶劑混合,使其溶解一點(diǎn)。接下來(lái),我們用刷子將混合物涂在頸部和儀器的主體上,讓它干燥。

如果我們發(fā)現(xiàn)產(chǎn)品需要第二層涂層,我們可以將這兩個(gè)部分打磨一下重新涂抹一層稀釋的清漆。

**預(yù)防措施:清漆是一種化學(xué)產(chǎn)品,因此必須在通風(fēng)處進(jìn)行此過(guò)程,戴上口罩以避免吸入異味和護(hù)目鏡。

我們需要能夠正常工作的材料是照片中出現(xiàn)的材料。主要是我們將使用刷子,清漆罐(在我們的情況下是紅色),一點(diǎn)溶劑和視覺(jué)保護(hù)。最重要的是在通風(fēng)良好的空間工作。

第6步:硬件

我們帶有Arduino,acelerometer和帶LED指示燈的銘牌將在一個(gè)小支架中引入,以避免所有組件在儀器中移動(dòng)。

我們還添加了一個(gè)電池座和一個(gè)開(kāi)關(guān),使其更舒適,我們不使用儀器時(shí)也不會(huì)耗盡電池。我們將這個(gè)支架用一塊維可牢尼龍搭扣(它也適用于硅膠和熱熔槍?zhuān)┻B接到尤克里里琴琴體的內(nèi)表面。

另一方面,LED輪小于孔,所以它會(huì)下降。已經(jīng)設(shè)計(jì)了一個(gè)支持,以便它可以很好地執(zhí)行其功能。

步驟7:軟件

為了給我們的夏威夷四弦琴做一個(gè)特殊的裝飾,我們可以通過(guò)一個(gè)LED輪來(lái)增加燈光效果。我們將使用WS2812,但您可以按照數(shù)據(jù)表的說(shuō)明使用任何其他產(chǎn)品。我們也將使用一個(gè)acelerometer(BMA220),它可以讓我們產(chǎn)生重力效應(yīng)。

事實(shí)上,我們將有4個(gè)光源,包括在Arduino的名為“Adafruit”的計(jì)算機(jī)庫(kù)中。為此,我們必須在三個(gè)組件之間做出正確的共識(shí):Arduino NANO,WS2812和BMA220,就像出現(xiàn)在第一張圖片中一樣。

紅色線用于供電,GND黑色和其余部分是正確操作所必需的連接。

我們用于燈具的代碼附在一個(gè)名為“play_of_light_v0”的文件中。鮑”。確保已包含必要的庫(kù)以正確操作程序。我們?cè)陔娐吠獠刻砑拥碾姵乇仨毦哂?V的最小電壓,我們必須確保它能夠提供為整個(gè)電路供電所需的最小電流。

//Variables contador e interrupción

int counter;

//Variables Ejemplo gravedad

#include

#include

#include

#define NUMBER_OF_LEDS_ON_RING 16

#define NEOPIXEL_RING_DATA_PIN 9

byte Version[3];

int8_t x_data;

int8_t y_data;

int8_t z_data;

byte range=0x00;

float divi=16;

float x,y,z;

float pi = 3.14159265359;

float nx,ny,angle;

int led, previousLed;

QueueList ledQueue;

Adafruit_NeoPixel neoring = Adafruit_NeoPixel(NUMBER_OF_LEDS_ON_RING, NEOPIXEL_RING_DATA_PIN, NEO_GRB + NEO_KHZ800);

//Variables Luces arcoiris

#include

#ifdef __AVR__

#include

#endif

#define PIN 9

// 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_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)

// NEO_KHZ400 400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)

// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)

// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)

// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)

Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across

// pixel power leads, add 300 - 500 Ohm resistor on first pixel‘s data input

// and minimize distance between Arduino and first pixel. Avoid connecting

// on a live circuit.。.if you must, connect GND first.

//Variables Rueda de colores

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson

// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library

#include

#ifdef __AVR__

#include

#endif

// Which pin on the Arduino is connected to the NeoPixels?

// On a Trinket or Gemma we suggest changing this to 1

#define PIN 9

// How many NeoPixels are attached to the Arduino?

#define NUMPIXELS 16

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.

// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest

// example for more information on possible values.

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int delayval = 50; // delay for 50ms

//Variables colores aleatorios

#include

#ifdef __AVR__

#include

#endif

#define PIN 9

#define NUM_LEDS 16

#define BRIGHTNESS 200

//Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRBW + NEO_KHZ800);

byte neopix_gamma[] = {

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,

2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5,

5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10,

10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,

17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,

25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,

37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,

51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,

69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,

90, 92, 93, 95, 96, 98, 99,101,102,104,105,107,109,110,112,114,

115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142,

144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175,

177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213,

215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255 };

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/METODO SETUP

void setup()

{

//Código: Dirección de la gravedad

neoring.begin();

neoring.setBrightness(200);

Serial.begin(9600);

Wire.begin();

Wire.beginTransmission(0x0A); // address of the accelerometer

// range settings

Wire.write(0x22); //register address

Wire.write(range); //can be set at“0x00”“0x01”“0x02”“0x03”, refer to Datashhet on wiki

// low pass filter

Wire.write(0x20); //register address

Wire.write(0x05); //can be set at“0x05”“0x04”。..。..“0x01”“0x00”, refer to Datashhet on wiki

Wire.endTransmission();

//Codigo; Luces Arcoiris

// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket

#if defined (__AVR_ATtiny85__)

if (F_CPU == 16000000) clock_prescale_set(clock_div_1);

#endif

// End of trinket special code

strip.begin();

strip.show(); // Initialize all pixels to ’off‘

//Código Rueda de colores

// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket

#if defined (__AVR_ATtiny85__)

if (F_CPU == 16000000) clock_prescale_set(clock_div_1);

#endif

// End of trinket special code

pixels.begin(); // This initializes the NeoPixel library.

//Codigo Interrupcion

counter = 1;

//Codigo Colores varios

// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket

#if defined (__AVR_ATtiny85__)

if (F_CPU == 16000000) clock_prescale_set(clock_div_1);

#endif

// End of trinket special code

strip.setBrightness(BRIGHTNESS);

strip.begin();

strip.show(); // Initialize all pixels to ’off‘

}

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/Bucle infinito

void loop() {

//Caso 1: Juego de luces de la gravedad;

if(counter == 1){

for(int i=0;i《100;i++){

switch(range) //change the data dealing method based on the range u’ve set

{

case 0x00:divi=16; break;

case 0x01:divi=8; break;

case 0x02:divi=4; break;

case 0x03:divi=2; break;

default: Serial.println(“range setting is Wrong,range:from 0to 3.Please check!”);while(1);

}

AccelerometerInit();

delay(100);

nx=x/2;

ny=y/2;

angle=atan((ny/nx))*180/pi;

if(angle 》 0.0){

if(nx《0.0)

angle+=180;

}

else{

if(ny 》 0.0)

angle+=180;

else

angle += 360;

}//end else

if(angle == 360.0)

angle = 0.0;

led = circularize(angle / (360 / NUMBER_OF_LEDS_ON_RING));

// make led movement smooth

if(previousLed == led){

// nothing to do

}

else if (counterClockwiseDistanceBetweenLeds(previousLed, led) 《= 8)

led = circularize(previousLed + 1);

else

led = circularize(previousLed - 1);

ledQueue.push(led);

makeLightShow();

previousLed = led;

delay(25);

}

counter = 2;

}//End if counter==1

//Caso 2: Codigo del juego de luces del arcoiris

else if(counter == 2){

for(int j=0; j《5;j++){

// Some example procedures showing how to display to the pixels:

colorWipe1(strip.Color(255, 0, 0), 50); // Red

colorWipe1(strip.Color(0, 255, 0), 50); // Green

colorWipe1(strip.Color(0, 0, 255), 50); // Blue

colorWipe1(strip.Color(0, 0, 0, 255), 50); // White RGBW

// Send a theater pixel chase in.。.

theaterChase(strip.Color(127, 127, 127), 50); // White

theaterChase(strip.Color(127, 0, 0), 50); // Red

theaterChase(strip.Color(0, 0, 127), 50); // Blue

rainbow(5);

rainbowCycle(5);

theaterChaseRainbow(5);

}

counter = 3;

}//End if counter==2

//Caso 3: Luces Aleatorias

else if(counter == 3){

for(int k=0;k《50;k++){

// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.

int a=random(255);

int b=random(255);

int c=random(255);

for(int i=0;i

// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255

pixels.setPixelColor(i, pixels.Color(a,b,c)); // Moderately bright green color.

pixels.show(); // This sends the updated pixel color to the hardware.

delay(delayval); // Delay for a period of time (in milliseconds)。

}

a=random(255);

b=random(255);

c=random(255);

for(int i=NUMPIXELS;i》0;i--){

// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255

pixels.setPixelColor(i, pixels.Color(a,b,c)); // Moderately bright green color.

pixels.show(); // This sends the updated pixel color to the hardware.

delay(delayval); // Delay for a period of time (in milliseconds)。

}

}

counter = 4;

}

else if(counter == 4){

for(int g=0;g《=6;g++){

// Some example procedures showing how to display to the pixels:

colorWipe(strip.Color(255, 0, 0), 50); // Red

colorWipe(strip.Color(0, 255, 0), 50); // Green

colorWipe(strip.Color(0, 0, 255), 50); // Blue

colorWipe(strip.Color(0, 0, 0, 255), 50); // White

whiteOverRainbow(20,75,5);

pulseWhite(5);

// fullWhite();

// delay(2000);

rainbowFade2White(3,3,1);

}

counter = 1;

}

}

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/Metodos del Ejemplo de la gravedad

void AccelerometerInit()

{

Wire.beginTransmission(0x0A); // address of the accelerometer

// reset the accelerometer

Wire.write(0x04); // X data

Wire.endTransmission();

Wire.requestFrom(0x0A,1); // request 6 bytes from slave device #2

while(Wire.available()) // slave may send less than requested

{

Version[0] = Wire.read(); // receive a byte as characte

}

x_data=(int8_t)Version[0]》》2;

Wire.beginTransmission(0x0A); // address of the accelerometer

// reset the accelerometer

Wire.write(0x06); // Y data

Wire.endTransmission();

Wire.requestFrom(0x0A,1); // request 6 bytes from slave device #2

while(Wire.available()) // slave may send less than requested

{

Version[1] = Wire.read(); // receive a byte as characte

}

y_data=(int8_t)Version[1]》》2;

Wire.beginTransmission(0x0A); // address of the accelerometer

// reset the accelerometer

Wire.write(0x08); // Z data

Wire.endTransmission();

Wire.requestFrom(0x0A,1); // request 6 bytes from slave device #2

while(Wire.available()) // slave may send less than requested

{

Version[2] = Wire.read(); // receive a byte as characte

}

z_data=(int8_t)Version[2]》》2;

x=(float)x_data/divi;

y=(float)y_data/divi;

z=(float)z_data/divi;

Serial.print(“X=”);

Serial.print(x); // print the character

Serial.print(“ ”);

Serial.print(“Y=”);

Serial.print(y); // print the character

Serial.print(“ ”);

Serial.print(“Z=”); // print the character

Serial.println(z);

}

int circularize(int pos){

if(pos 》= NUMBER_OF_LEDS_ON_RING)

return(pos - NUMBER_OF_LEDS_ON_RING);

else if(pos 《 0)

return(pos + NUMBER_OF_LEDS_ON_RING);

else

return(pos);

}

int distance;

int counterClockwiseDistanceBetweenLeds(int prevPos, int nextPos){

distance = nextPos - prevPos;

if(distance 《 0)

distance += NUMBER_OF_LEDS_ON_RING;

return(distance);

}

int ledPosition, currentQueueSize;

#define NUMBER_OF_LEDS_TO_SHINE 10

int brightnessStep = 255/NUMBER_OF_LEDS_TO_SHINE;

void makeLightShow(){

for(int j = 0; j 《 NUMBER_OF_LEDS_ON_RING; j++)

neoring.setPixelColor(j, 0, 0, 0);

currentQueueSize = ledQueue.count();

for(int k = 0; k 《 currentQueueSize; k++){

ledPosition = ledQueue.pop();

neoring.setPixelColor(ledPosition, 0, (brightnessStep * k), 0);

if((k == 0 && currentQueueSize 《 NUMBER_OF_LEDS_TO_SHINE) || k 》 0)

ledQueue.push(ledPosition);

}

neoring.show();

}

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/Metodos del juego de luces del arcoiris

// Fill the dots one after the other with a color

void colorWipe(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i

void rainbow(uint8_t wait) {

uint16_t i, j;

for(j=0; j《256; j++) {

for(i=0; i

// 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);

}

}

//Theatre-style crawling lights.

void theaterChase(uint32_t c, uint8_t wait) {

for (int j=0; j《10; j++) { //do 10 cycles of chasing

for (int q=0; q 《 3; q++) {

for (uint16_t i=0; i 《 strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, c); //turn every third pixel on

}

strip.show();

delay(wait);

for (uint16_t i=0; i 《 strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, 0); //turn every third pixel off

}

}

}

}

//Theatre-style crawling lights with rainbow effect

void theaterChaseRainbow(uint8_t wait) {

for (int j=0; j 《 256; j++) { // cycle all 256 colors in the wheel

for (int q=0; q 《 3; q++) {

for (uint16_t i=0; i 《 strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on

}

strip.show();

delay(wait);

for (uint16_t i=0; i 《 strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, 0); //turn every third pixel off

}

}

}

}

// 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);

}

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/Metodos Rueda de colores

// int elegirColor = random(0x000000,0xffffff);//Se elige aleatoriamente entre toda la gama de colores comprendida entre 0x000000 y 0xFFFFFF

//CylonEyeColor=HtmlColor(elegirColor);

//int elegirColor = random(1,7);//Podemos elegir aleatoriamente entre los 7 colores que hay debajo0xf0ffff

// if(elegirColor == 1) CylonEyeColor=HtmlColor(0xff0000);//Rojo

// if(elegirColor == 2) CylonEyeColor=HtmlColor(0x00ff00);//Verde

// if(elegirColor == 3) CylonEyeColor=HtmlColor(0x0000ff);//Azul

// if(elegirColor == 4) CylonEyeColor=HtmlColor(0xffff00);//Amarillo

// if(elegirColor == 5) CylonEyeColor=HtmlColor(0x200020);//Morado

// if(elegirColor == 6) CylonEyeColor=HtmlColor(0x00ffff);//Azul Claro

// if(elegirColor == 7) CylonEyeColor=HtmlColor(0x100010);//Rosa

//CylonEyeColor=HtmlColor(0x000000);

///////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////

/Metodos luces varias

// Fill the dots one after the other with a color

void colorWipe1(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i

void pulseWhite(uint8_t wait) {

for(int j = 0; j 《 256 ; j++){

for(uint16_t i=0; i

for(int j = 255; j 》= 0 ; j--){

for(uint16_t i=0; i

void rainbowFade2White(uint8_t wait, int rainbowLoops, int whiteLoops) {

float fadeMax = 100.0;

int fadeVal = 0;

uint32_t wheelVal;

int redVal, greenVal, blueVal;

for(int k = 0 ; k 《 rainbowLoops ; k ++){

for(int j=0; j《256; j++) { // 5 cycles of all colors on wheel

for(int i=0; i《 strip.numPixels(); i++) {

wheelVal = Wheel(((i * 256 / strip.numPixels()) + j) & 255);

redVal = red(wheelVal) * float(fadeVal/fadeMax);

greenVal = green(wheelVal) * float(fadeVal/fadeMax);

blueVal = blue(wheelVal) * float(fadeVal/fadeMax);

strip.setPixelColor( i, strip.Color( redVal, greenVal, blueVal ) );

}

//First loop, fade in!

if(k == 0 && fadeVal 《 fadeMax-1) {

fadeVal++;

}

//Last loop, fade out!

else if(k == rainbowLoops - 1 && j 》 255 - fadeMax ){

fadeVal--;

}

strip.show();

delay(wait);

}

}

delay(500);

for(int k = 0 ; k 《 whiteLoops ; k ++){

for(int j = 0; j 《 256 ; j++){

for(uint16_t i=0; i 《 strip.numPixels(); i++) {

strip.setPixelColor(i, strip.Color(0,0,0, neopix_gamma[j] ) );

}

strip.show();

}

delay(2000);

for(int j = 255; j 》= 0 ; j--){

for(uint16_t i=0; i 《 strip.numPixels(); i++) {

strip.setPixelColor(i, strip.Color(0,0,0, neopix_gamma[j] ) );

}

strip.show();

}

}

delay(500);

}

void whiteOverRainbow(uint8_t wait, uint8_t whiteSpeed, uint8_t whiteLength ) {

if(whiteLength 》= strip.numPixels()) whiteLength = strip.numPixels() - 1;

int head = whiteLength - 1;

int tail = 0;

int loops = 3;

int loopNum = 0;

static unsigned long lastTime = 0;

while(true){

for(int j=0; j《256; j++) {

for(uint16_t i=0; i= tail && i 《= head) || (tail 》 head && i 》= tail) || (tail 》 head && i 《= head) ){

strip.setPixelColor(i, strip.Color(0,0,0, 255 ) );

}

else{

strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));

}

}

if(millis() - lastTime 》 whiteSpeed) {

head++;

tail++;

if(head == strip.numPixels()){

loopNum++;

}

lastTime = millis();

}

if(loopNum == loops) return;

head%=strip.numPixels();

tail%=strip.numPixels();

strip.show();

delay(wait);

}

}

}

void fullWhite() {

for(uint16_t i=0; i

// Slightly different, this makes the rainbow equally distributed throughout

void rainbowCycle1(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);

}

}

void rainbow1(uint8_t wait) {

uint16_t i, j;

for(j=0; j《256; j++) {

for(i=0; i

// Input a value 0 to 255 to get a color value.

// The colours are a transition r - g - b - back to r.

uint32_t Wheel1(byte WheelPos) {

WheelPos = 255 - WheelPos;

if(WheelPos 《 85) {

return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3,0);

}

if(WheelPos 《 170) {

WheelPos -= 85;

return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3,0);

}

WheelPos -= 170;

return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0,0);

}

uint8_t red(uint32_t c) {

return (c 》》 16);

}

uint8_t green(uint32_t c) {

return (c 》》 8);

}

uint8_t blue(uint32_t c) {

return (c);

}

步驟8:3D設(shè)計(jì)

首先,您必須調(diào)整硬件組件的大小以確保正確。如果它們與我們的相同,您可以使用我們借給您的相同文件。

兩種支持都是使用3D打印機(jī)設(shè)計(jì)的,它們也包括在內(nèi):

ukelele_support_arduino_v0.stl:https://www.tinkercad.com/things/1aAGZ1xFptA-ukel。 。. ukelele_support_WS2812_v0.stl:https://www.tinkercad.com/things/1aAGZ1xFptA-ukel.。.

最后,燈光會(huì)像最后兩張照片一樣。

步驟9:安裝頸部

首先,我們將馬鞍放在頸部。螺絲需要固定的孔不在那里,所以我們必須制作它們,用螺旋鉆小心地標(biāo)記它們應(yīng)該去的地方,制作孔。

這同樣適用于用于將頸部固定在儀器主體上的螺釘?shù)目住](méi)有必要這樣做,因?yàn)檫@種緊固沒(méi)有螺釘,但如果我們想這樣做,就沒(méi)有問(wèn)題。

重要提示:在桅桿的起點(diǎn)和音叉的起點(diǎn)之間留出5mm的空間,因?yàn)樵谀莻€(gè)孔中將放置螺母。

我們將用膠水,按照?qǐng)D中所示的方向。

最后,我們將在桅桿開(kāi)頭的孔中引入4個(gè)針腳,每個(gè)針腳用2個(gè)短螺釘固定,如圖所示。

步驟10:安裝Birdge

通過(guò)粘合固定橋接兩個(gè)長(zhǎng)螺釘位于車(chē)身中央位置。建議用鉛筆在身體上標(biāo)記正確的位置。我們將采用圖像中標(biāo)記的距離。

我們將在兩個(gè)組件的并集處應(yīng)用膠水。我們?cè)跀Q緊螺絲的幫助下仔細(xì)固定這兩個(gè)部件,直到接頭干燥。我們將用1.5mm鉆頭為木頭制作螺釘?shù)膬蓚€(gè)孔。用兩個(gè)長(zhǎng)螺釘固定橋體。最后,我們將保護(hù)帽放在螺釘?shù)念^部。

步驟11:身體和頸部組裝

為了組裝這兩個(gè)部分,我們?cè)谏眢w的頭部有個(gè)洞,脖子上有兩個(gè)突出部分。我們可以用膠水或熱熔膠膠粘它們。為了獲得更大的固定效果,您可以將音叉末端的孔連接到身體上。

步驟12:放入尤克里里琴弦

最后我們必須放置字符串,以便我們的儀器完成。

以前我們會(huì)將銷(xiāo)的固定環(huán)插入穿過(guò)桅桿的突出部分中。為了放置琴弦,我們采用了套件附帶的4個(gè)琴弦。首先,您必須區(qū)分每個(gè)字符串,因?yàn)樗鼈儾⒎峭耆嗤D惚仨毥壸∶扛业囊欢耍▋蓚€(gè)粗節(jié)用正常的結(jié),兩個(gè)薄的用一個(gè)雙節(jié))并將琴弦插入琴橋的插槽中。

然后我們將以下列方式放置字符串:

?第一個(gè)位置:G字符串(第二個(gè)最粗的字符串)。

?第二個(gè)位置:C字符串(粗字符串) )。

?第三個(gè)位置:E字符串(第二個(gè)較細(xì)的字符串)。

?第四個(gè)位置:一個(gè)字符串(較細(xì)的字符串)。

將字符串穿入孔中提供的插頭。嘗試通過(guò)在銷(xiāo)上旋轉(zhuǎn)兩到三圈來(lái)固定每根繩子。在不施加過(guò)大力量的情況下拉緊琴弦并檢查琴弦和琴鞍之間的距離。

如果你對(duì)如何制作它有任何疑問(wèn),你可以在教程中解釋你如何正確地設(shè)置琴弦。

步驟13:測(cè)試

最后,我們要看看尤克里里琴是否有已正確組裝,使第一個(gè)音品上的理想距離為0.1毫米,而第十二個(gè)音符上的理想距離約為1.2毫米。

需要調(diào)整四弦琴弦。我推薦你這個(gè)應(yīng)用程序:GuitarTuna

聲明:本文內(nèi)容及配圖由入駐作者撰寫(xiě)或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • led
    led
    +關(guān)注

    關(guān)注

    242

    文章

    23857

    瀏覽量

    674717
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    降壓線性恒流40V LED恒流驅(qū)動(dòng)芯片H7304B低功耗 無(wú)需電感2.5-36V降5V12V

    PWM 調(diào)光功能實(shí)現(xiàn)豐富的燈光效果,營(yíng)造出不同的氛圍。 汽車(chē)照明:可用于車(chē)內(nèi) LED 照明,如氛圍燈、閱讀燈、后備箱燈、低位照明等,也可用于部分低壓車(chē)外輔助照明。例如車(chē)內(nèi)氛圍燈,利用其高精度恒流控制
    發(fā)表于 07-21 09:37

    惠洋科技24V 36V 48V降9V 12V 48V恒流芯片H5119GRGBW調(diào)光舞臺(tái)燈芯片

    的調(diào)光效果,滿足舞臺(tái)燈光多樣化的調(diào)光需求,為演出創(chuàng)造出豐富多彩的視覺(jué)效果。 景觀亮化照明:在 DMX512 景觀照明工程中,如洗墻燈、點(diǎn)光源、點(diǎn)陣洗墻燈等會(huì)用到該芯片。它能精準(zhǔn)控制 LED
    發(fā)表于 07-14 09:41

    亮化燈光控制系統(tǒng):可編程調(diào)光控制,智能自控照明效果

    隨著城市化進(jìn)程的加快和人們生活品質(zhì)的提升,城市亮化工程已成為現(xiàn)代都市建設(shè)的重要組成部分。亮化燈光控制系統(tǒng)作為實(shí)現(xiàn)城市夜景照明智能化、節(jié)能化、藝術(shù)化的核心技術(shù),正日益受到政府、企業(yè)和公眾的關(guān)注。 亮化
    的頭像 發(fā)表于 04-29 17:05 ?390次閱讀

    如何制造一個(gè)可以自主演奏音樂(lè)的克里里機(jī)器人?

    在這個(gè)項(xiàng)目中,設(shè)計(jì)并制造了一個(gè)可以自主演奏音樂(lè)的自彈克里里機(jī)器人!材料:基于ArduinoUno微控制器!其他部件克里里(任何便宜的型號(hào)都可以)ArduinoUnoL293D電機(jī)驅(qū)
    的頭像 發(fā)表于 04-15 11:51 ?269次閱讀
    如何制造一個(gè)可以自主演奏音樂(lè)的<b class='flag-5'>尤</b><b class='flag-5'>克里里</b>機(jī)器人?

    基于FPGA的電子設(shè)計(jì)

    過(guò)簡(jiǎn)單的例子來(lái)讓大家去系統(tǒng)的學(xué)習(xí)和認(rèn)識(shí)FPGA。本次的電子設(shè)計(jì)也算是一次簡(jiǎn)單的各個(gè)模塊的聯(lián)系調(diào)用的一個(gè)過(guò)程,也可以幫助各位去加深理解,多動(dòng)手,熟練掌握會(huì)有意想不到的效果
    的頭像 發(fā)表于 01-20 14:07 ?857次閱讀
    基于FPGA的電子<b class='flag-5'>琴</b>設(shè)計(jì)

    ADS1601的參考電壓是內(nèi)部效果好,還是外接好?

    請(qǐng)問(wèn)一下ADS1601的參考電壓是內(nèi)部效果好,還是外接好?謝謝
    發(fā)表于 12-20 07:29

    躍昉科技亮相2024澳青年創(chuàng)新創(chuàng)業(yè)發(fā)展大會(huì)

    近日,“相約澳 青創(chuàng)未來(lái)”2024澳青年創(chuàng)新創(chuàng)業(yè)發(fā)展大會(huì)在橫琴粵澳深度合作區(qū)星享·橫琴天沐酒店隆重舉行,珠海大橫琴集團(tuán)有限公司在大會(huì)上首次發(fā)布“澳青創(chuàng) 生生不息”創(chuàng)新創(chuàng)業(yè)生態(tài)體系,聚焦
    的頭像 發(fā)表于 12-10 14:41 ?693次閱讀

    智能化燈光控制系統(tǒng)

    的管理與控制,實(shí)現(xiàn)了燈光效果的多樣化與個(gè)性化定制。 一、基本概念 智能化燈光控制系統(tǒng),利用現(xiàn)代通信、物聯(lián)網(wǎng)技術(shù)、人工智能等技術(shù),對(duì)家庭或商業(yè)場(chǎng)所的照明系統(tǒng)進(jìn)行集成改造。其核心在于通過(guò)中央控制器(如智能網(wǎng)關(guān))與各個(gè)
    的頭像 發(fā)表于 12-05 16:50 ?1030次閱讀

    開(kāi)源項(xiàng)目!可以自主演奏音樂(lè)的克里里機(jī)器人!

    克里里上。然后您將需要 4× plunger_center.stl 和 4×plunger_side.stl ,但這可能會(huì)根據(jù)使用的螺線管數(shù)量及其布局而變化。 *附件:3D模型資料.7z 第 2
    發(fā)表于 11-25 14:41

    舞臺(tái)燈電機(jī)驅(qū)動(dòng)芯片_步進(jìn)驅(qū)動(dòng)ic-選型指南_應(yīng)用方案

    技術(shù)不成熟,燈光設(shè)備只能固定在某一位置,難以實(shí)現(xiàn)多樣化的燈光效果。而現(xiàn)在,安裝有伺服電機(jī)的燈光設(shè)備可以解決技術(shù)限制,使燈光設(shè)備可以輕松調(diào)整角度和方向,展示
    的頭像 發(fā)表于 10-28 10:55 ?606次閱讀
    舞臺(tái)燈電機(jī)驅(qū)動(dòng)芯片_步進(jìn)驅(qū)動(dòng)ic-選型指南_應(yīng)用方案

    工業(yè)AI視覺(jué)檢測(cè)軟件培訓(xùn) 工業(yè)AI視覺(jué)檢測(cè)?上海勁恩

    目前,中國(guó)制造業(yè)正面臨著從傳統(tǒng)制造向智能制造轉(zhuǎn)型升級(jí)的重大機(jī)遇。在這種背景下,機(jī)器視覺(jué)系統(tǒng)應(yīng)運(yùn)而生。 在此背景下,勁恩以“讓每一個(gè)人都能成為智能機(jī)器人”為使命,通過(guò)研發(fā)和落地實(shí)踐,推動(dòng)行業(yè)智能化
    的頭像 發(fā)表于 10-23 16:45 ?545次閱讀

    STM32項(xiàng)目實(shí)戰(zhàn):基于STM32F4的智能燈光控制系統(tǒng)(LVGL),附項(xiàng)目教程/源碼

    平臺(tái)是STM32F4開(kāi)發(fā)板+資源擴(kuò)展板+顯示觸摸屏+仿真器,項(xiàng)目的演示界面如下圖所示。智能燈光控制系統(tǒng)項(xiàng)目,需要一個(gè)LED燈光執(zhí)行器件,模擬燈光效果;一個(gè)光照傳感
    的頭像 發(fā)表于 10-17 16:16 ?1909次閱讀
    STM32項(xiàng)目實(shí)戰(zhàn):基于STM32F4的智能<b class='flag-5'>燈光</b>控制系統(tǒng)(LVGL),附項(xiàng)目教程/源碼

    MS35631N無(wú)刷直流馬達(dá)驅(qū)動(dòng)IC硬件技術(shù)助力舞臺(tái)燈光

    在絢麗多彩、如夢(mèng)如幻的舞臺(tái)背后,有一項(xiàng)至關(guān)重要的技術(shù)默默支撐著那璀璨奪目的燈光效果,那就是 MS35631N 無(wú)刷直流馬達(dá)驅(qū)動(dòng) IC 硬件技術(shù)。這項(xiàng)技術(shù)宛如一位幕后英雄,雖然鮮為人知,卻在舞臺(tái)燈光
    的頭像 發(fā)表于 09-04 17:34 ?675次閱讀

    LED燈光亮化引領(lǐng)著現(xiàn)代照明的潮流

    隨著科技的迅猛發(fā)展,LED(發(fā)光二極管)照明技術(shù)在我們的日常生活中逐漸普及,逐步替代傳統(tǒng)的照明光源。LED燈光亮化,作為一種新型照明方式,憑借其節(jié)能、環(huán)保以及長(zhǎng)壽命等諸多優(yōu)勢(shì),正在引領(lǐng)著現(xiàn)代照明的潮流。
    的頭像 發(fā)表于 09-03 17:33 ?1577次閱讀
    <b class='flag-5'>LED</b><b class='flag-5'>燈光</b>亮化引領(lǐng)著現(xiàn)代照明的潮流

    LED機(jī)械矩陣屏:打造獨(dú)特視覺(jué)效果的視覺(jué)盛宴

    一、引言 隨著科技的不斷發(fā)展,LED顯示技術(shù)也在不斷更新和升級(jí)。其中,LED機(jī)械矩陣屏憑借其獨(dú)特的視覺(jué)效果和靈活的應(yīng)用場(chǎng)景,成為了新一代的顯示設(shè)備。本文將為您介紹LED機(jī)械矩陣屏的相關(guān)
    的頭像 發(fā)表于 07-29 09:30 ?947次閱讀