91欧美超碰AV自拍|国产成年人性爱视频免费看|亚洲 日韩 欧美一厂二区入|人人看人人爽人人操aV|丝袜美腿视频一区二区在线看|人人操人人爽人人爱|婷婷五月天超碰|97色色欧美亚州A√|另类A√无码精品一级av|欧美特级日韩特级

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

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

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

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

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

掃碼添加小助手

加入工程師交流群

第1步:材料

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

結構材料:

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

1- Body。

2-neck。

3-Saddle

4-Rope Support

5-Bridge

6-String nut 。

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

8機頭(x4)。

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

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

12弦( x4)。

電子資料

NANO Arduino。

Leds輪WS2812。

加速度計BMA220(可選)。

電池連接器。

9V電池。

轉移。

其他

木器清漆。

魔術貼。

焊錫。

用于上漆的保護性塑料。

熱熔硅膠。

工具:

激光雕刻。

砂紙

星形螺絲刀。

畫筆。

熱熔槍。

錫烙鐵。

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

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

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

首先,我們必須設計繪圖模板來進行雕刻。

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

使用它,我們必須調(diào)整我們想要使用的圖片,就像我們在第二張圖片中顯示的那樣。您可以看到我們已經(jīng)旋轉了初始圖像,可以用儀器的圓圈調(diào)整手的cicle。就像我們之前說的那樣,你可以放任何圖像。

第3步:使用Inkscape對圖像進行矢量化

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

Inkscape Inkscape是一個開源矢量圖形編輯器,正如標題所暗示的,這是我將用來矢量化徽標的工具。矢量化步驟這些步驟對于我們可能想要進行的任何矢量化都是常見的。

在Inkscape中打開圖像

打開跟蹤位圖工具路徑 - 》跟蹤位圖

圍繞跟蹤位圖選項進行游戲

運行跟蹤

清理結果(如有必要)

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

第4步:徽標雕刻

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

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

一旦我們打開軟件,我們必須加載圖像我們在最后一步創(chuàng)建了。然后,按“控制激光”按鈕,出現(xiàn)cnc控件。

兩張照片顯示了我們激光切割機雕刻的過程和結果。

步驟5:打磨和上漆

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

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

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

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

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

第6步:硬件

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

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

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

步驟7:軟件

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

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

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

我們用于燈具的代碼附在一個名為“play_of_light_v0”的文件中。鮑”。確保已包含必要的庫以正確操作程序。我們在電路外部添加的電池必須具有9V的最小電壓,我們必須確保它能夠提供為整個電路供電所需的最小電流。

//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設計

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

兩種支持都是使用3D打印機設計的,它們也包括在內(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.。.

最后,燈光會像最后兩張照片一樣。

步驟9:安裝頸部

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

這同樣適用于用于將頸部固定在儀器主體上的螺釘?shù)目?。沒有必要這樣做,因為這種緊固沒有螺釘,但如果我們想這樣做,就沒有問題。

重要提示:在桅桿的起點和音叉的起點之間留出5mm的空間,因為在那個孔中將放置螺母。

我們將用膠水,按照圖中所示的方向。

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

步驟10:安裝Birdge

通過粘合固定橋接兩個長螺釘位于車身中央位置。建議用鉛筆在身體上標記正確的位置。我們將采用圖像中標記的距離。

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

步驟11:身體和頸部組裝

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

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

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

以前我們會將銷的固定環(huán)插入穿過桅桿的突出部分中。為了放置琴弦,我們采用了套件附帶的4個琴弦。首先,您必須區(qū)分每個字符串,因為它們并非完全相同。你必須綁住每根弦的一端(兩個粗節(jié)用正常的結,兩個薄的用一個雙節(jié))并將琴弦插入琴橋的插槽中。

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

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

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

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

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

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

如果你對如何制作它有任何疑問,你可以在教程中解釋你如何正確地設置琴弦。

步驟13:測試

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

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

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

    關注

    244

    文章

    24673

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    涂鴉On-App AI生成式燈光場景方案,零門檻、毫秒級打造專業(yè)級全屋照明

    燈光,是一個家的情緒載體和風格名片。如今,智能照明越來越注重氛圍營造與美學表達,用戶(包括普通消費者、設計師及銷售施工方)希望以更簡單的方式,快速獲得專業(yè)級燈光效果。然而,當前的燈光場景配置存在明顯
    的頭像 發(fā)表于 01-09 12:06 ?580次閱讀
    涂鴉On-App AI生成式<b class='flag-5'>燈光</b>場景方案,零門檻、毫秒級打造專業(yè)級全屋照明

    零知IDE——基于STM32F103RBT6的PAJ7620U2手勢控制WS2812 RGB燈帶系統(tǒng)

    基于STM32F103RBT6的手勢控制LED系統(tǒng),通過PAJ7620U2傳感器識別手勢動作,驅動WS2812B燈帶實現(xiàn)交互式燈光效果。系統(tǒng)采用軟件I2C通信和SPI+DMA驅動方案,支持揮手開關機、手部位置跟蹤及彩虹尾影效果
    的頭像 發(fā)表于 12-29 17:48 ?2002次閱讀
    零知IDE——基于STM32F103RBT6的PAJ7620U2手勢控制WS2812 RGB燈帶系統(tǒng)

    LED觸摸控制PCBA方案開發(fā) | 燈控觸摸方案開發(fā)

    的技術選擇,適用于多種照明場景。簡潔操作,豐富效果這款單鍵LED觸摸控制板,通過一個按鍵即可實現(xiàn)多種交互方式(單擊、雙擊、長按),輕松控制LED燈光的:開關與調(diào)光
    的頭像 發(fā)表于 12-10 17:43 ?457次閱讀
    <b class='flag-5'>LED</b>觸摸控制PCBA方案開發(fā) | 燈控觸摸方案開發(fā)

    VSCode + ESP-IDF環(huán)境下ESP32-S3項目添加頭文件

    VSCode + ESP-IDF環(huán)境下ESP32-S3項目添加頭文件
    的頭像 發(fā)表于 11-28 07:27 ?2885次閱讀

    FZH16 固定花樣 6 通道LED流星雨顯示效果驅動IC

    是固定花樣 6 通道LED流星雨顯示效果驅動IC。本產(chǎn)品內(nèi)部自帶振蕩器,PWM輸出進行灰度 漸變。上電復位后,輸出PWM波形,進行 6 通道的LED依次循環(huán)控制,實現(xiàn)流星、水滴效果
    發(fā)表于 11-14 09:34

    LuatOS中PWM實現(xiàn)LED亮度調(diào)節(jié)與呼吸燈的實戰(zhàn)教程

    PWM在LED亮度調(diào)節(jié)和呼吸燈效果實現(xiàn)方面有著廣泛應用。在LuatOS環(huán)境中,如何高效運用PWM功能是開發(fā)者需要掌握的關鍵。本實戰(zhàn)教程將通過具體案例,引導開發(fā)者快速上手,輕松實現(xiàn)LED的精彩
    的頭像 發(fā)表于 11-11 19:05 ?8574次閱讀
    LuatOS中PWM實現(xiàn)<b class='flag-5'>LED</b>亮度調(diào)節(jié)與呼吸燈的實戰(zhàn)教程

    ?STEVAL-LLL015V1評估板技術解析:96通道LED驅動系統(tǒng)的設計與應用

    序列(單次或重復),可通過STSW-LED1202GUI進行可編程。在將腳本下載到電路板之前,使用GUI內(nèi)的簡易腳本語言創(chuàng)建和調(diào)試燈光效果。下載后,評估板可以獨立運行腳本,無需PC軟件。
    的頭像 發(fā)表于 10-16 17:10 ?962次閱讀
    ?STEVAL-LLL015V1評估板技術解析:96通道<b class='flag-5'>LED</b>驅動系統(tǒng)的設計與應用

    LP8501 多用途 9 輸出 LED 驅動器技術手冊

    燈光效果。 高效電荷泵可在整個鋰離子電池電壓范圍內(nèi)實現(xiàn) LED 驅動。通過根據(jù) LED 正向電壓要求自主選擇最佳電荷泵增益,可在較寬的工作范圍內(nèi)實現(xiàn)出色的效率。LP8501 能夠在 L
    的頭像 發(fā)表于 09-03 10:18 ?2787次閱讀
    LP8501 多用途 9 輸出 <b class='flag-5'>LED</b> 驅動器技術手冊

    低壓LED地埋燈H6338A降壓恒流芯片 36V48V60V降9V12V5V24V 1.2A

    滿足舞臺燈光對亮度調(diào)節(jié)的高精度要求,實現(xiàn)豐富多樣的燈光效果。 洗墻燈:其優(yōu)異的負載調(diào)整率和線性調(diào)整率,可確保洗墻燈在不同負載和輸入電壓條件下都能提供均勻、穩(wěn)定的光照,呈現(xiàn)出高質量的洗墻效果。 智能照明
    發(fā)表于 08-23 09:47

    如何使用 M252 PSIO 實現(xiàn) ARGB2 LED 定時,實現(xiàn)彩虹、劇場追逐彩虹等燈光效果

    使用 M252 PSIO 實現(xiàn) ARGB2 LED 定時,實現(xiàn)彩虹、劇場追逐彩虹等燈光效果
    發(fā)表于 08-20 06:58

    炫彩光影新體驗HTR7216 (S)、HTR7198 (S)、HTR7144 (S) 智能操控力原廠技術支持一級代理聚能芯半導體

    HTR7198硬件兼容IS31FL3743; TI LP586x系列市場,功能替代。 每個 LED 燈可靈活配置 3 種呼吸模式,還支持組控制,輕松打造多樣燈光效果。自動呼吸功能大幅降低 MCU 操作
    發(fā)表于 08-12 17:54

    德州儀器LP5810 4通道RGBW LED驅動器技術解析

    驅動器的工作溫度范圍為-40°C至85°C。這些驅動器生成6MHz時鐘信號并同步多個設備之間的燈光效果。LP5810驅動器非常適合便攜式和可穿戴設備、游戲和家庭娛樂、物聯(lián)網(wǎng)(IoT)、網(wǎng)絡和工業(yè)HMI。
    的頭像 發(fā)表于 08-11 10:29 ?1376次閱讀
    德州儀器LP5810 4通道RGBW <b class='flag-5'>LED</b>驅動器技術解析

    LP5812 4×3矩陣RGB LED驅動器技術解析與應用指南

    燈光效果。LP5812驅動器具有單獨的led點開路/短路檢測和集成去重影功能。這些LED驅動器的工作電壓范圍為2.7V至5.5V,溫度范圍為-40°C至85°C。LP5812驅動器非常適合便攜式和可穿戴設備、游戲和家庭娛樂、物
    的頭像 發(fā)表于 08-08 16:18 ?1331次閱讀
    LP5812 4×3矩陣RGB <b class='flag-5'>LED</b>驅動器技術解析與應用指南

    降壓線性恒流40V LED恒流驅動芯片H7304B低功耗 無需電感2.5-36V降5V12V

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

    如何制造一個可以自主演奏音樂的克里里機器人?

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