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

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)源:網(wǎng)絡(luò)整理 ? 作者:網(wǎng)絡(luò)整理 ? 2019-11-27 09:58 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

概述

永恒的時(shí)尚標(biāo)準(zhǔn),帶有聲音感應(yīng),全彩LED動(dòng)畫(huà),并可以通過(guò)手機(jī)無(wú)線控制。

受約翰G啟發(fā),此經(jīng)典Ampli-Tie的更新使用了 Circuit Playground Bluefruit 和 Neopixel LED ,可將領(lǐng)帶變成便攜式的,可自定義的燈光秀-無(wú)需焊接。這肯定會(huì)在舞池和絕大多數(shù)正式活動(dòng)中引起您的注意。

您需要什么

電路場(chǎng)Bluefruit-低功耗藍(lán)牙

產(chǎn)品ID:4333

電路游樂(lè)場(chǎng)Bluefruit是電路游樂(lè)場(chǎng)系列中的第三塊板,朝著完美介紹電子學(xué)和編程邁出了一步。我們已經(jīng)。..

$ 24.95

進(jìn)貨

添加到購(gòu)物車(chē)

炫彩LED燈帶的制作

Adafruit NeoPixel LED點(diǎn)鏈-20“,間距2”

產(chǎn)品ID:3630

將NeoPixel條形連接到服裝上可能會(huì)很費(fèi)力,因?yàn)槿嵝?a target="_blank">PCB彎曲得過(guò)多時(shí)會(huì)破裂,因此如何添加少量的顏色點(diǎn)呢?擱淺的NeoPixel點(diǎn)!。..

$ 27.50

入庫(kù)存

添加到購(gòu)物車(chē)

USB電纜-USB A到Micro-B

產(chǎn)品ID:592

這是您的標(biāo)準(zhǔn)A到Micro-B USB電纜,用于USB 1.1或2.0,非常適合將PC連接到Metro,F(xiàn)eather,Raspberry Pi或其他dev-board或。..

$ 2.95

進(jìn)貨

添加到購(gòu)物車(chē)

電路場(chǎng)的螺栓固定套件, micro:bit,F(xiàn)lora或Gemma

產(chǎn)品ID:4103

您有一個(gè)Circuit Playground Express,想連接一些電線以添加LED或傳感器或揚(yáng)聲器嗎?您可以使用我們的。..

$ 1.50

入庫(kù)存

添加到購(gòu)物車(chē)

1 x 鋰離子聚合物電池-3.7v 1200mAh

力量

添加到購(gòu)物車(chē)

1 x 剝線鉗

用于暴露引線

添加到購(gòu)物車(chē)

1 x 剪刀

用于修剪電線,螺紋等

添加到購(gòu)物車(chē)

1 x 口袋螺絲刀

用于固定電線

添加到購(gòu)物車(chē)

1 x 縫制針

縫制這些像素

添加到購(gòu)物車(chē)

Plus…

分離式或夾式領(lǐng)帶-如果您想要一個(gè)不錯(cuò)的領(lǐng)帶,請(qǐng)參見(jiàn)

織物(用于電池袋)

螺紋

10毫米下擺帶

鐵和熨衣板

iPhone/iPad(iOS 11.3或更高版本)或帶有BLE的Android設(shè)備(Android 4.4或更高版本)

Circuit Playground Bluefruit上的CircuitPython

安裝或更新CircuitPython

按照以下快速分步操作,在Circuit Playground Bluefruit上安裝或更新CircuitPython。

Circuit Playground Bluefruit需要CircuitPython 5.0+。 CircuitPython 5.0當(dāng)前處于Alpha狀態(tài)。這意味著我們?nèi)栽谂μ砑庸δ懿⒔鉀Q問(wèn)題。如果遇到任何問(wèn)題,請(qǐng)通過(guò)#help-with-circuitpython頻道的Discord(https://adafru.it/discord)與我們聯(lián)系,或者在GitHub上通過(guò)https://github.com/adafruit/提交問(wèn)題。

此外,如果要使用要使用此開(kāi)發(fā)板的藍(lán)牙(BLE)功能,您需要adafruit_ble庫(kù)的預(yù)發(fā)行版本。從https://github.com/adafruit/Adafruit_CircuitPython_BLE/releases

中選擇最新的預(yù)發(fā)布版本,可通過(guò)circuitpython.org 《

點(diǎn)擊鏈接上方并下載最新的UF2文件

下載并將其保存到桌面(或任何方便的地方)

使用已知的具有良好數(shù)據(jù)功能的USB電纜將Circuit Playground Bluefruit插入計(jì)算機(jī)。

許多人最終使用僅可充電的USB電纜,這非常令人沮喪!因此,請(qǐng)確保您擁有知道對(duì)數(shù)據(jù)同步有用的USB電纜。

雙擊CPB中間的小 Reset 小按鈕(由表示圖片中的紅色箭頭)。十個(gè)NeoPixel LED將全部變?yōu)榧t色,然后全部變?yōu)榫G色。如果它們?nèi)孔優(yōu)榧t色并保持紅色,請(qǐng)檢查USB電纜,嘗試使用另一個(gè)USB端口,等等。USB連接器旁邊的紅色LED指示燈將呈紅色閃爍-可以!

如果雙擊鼠標(biāo)不第一次沒(méi)有工作,請(qǐng)?jiān)僭囈淮?。有時(shí)可能需要一些嘗試才能使節(jié)奏正確!

(如果雙擊不起作用,請(qǐng)單擊一下?。?/p>

您將看到一個(gè)名為 CPLAYBTBOOT 的新磁盤(pán)驅(qū)動(dòng)器

將 adafruit_circuitpython_etc.uf2 文件拖到 CPLAYBTBOOT。

LED將變?yōu)榧t色。然后, CPLAYBTBOOT 驅(qū)動(dòng)器將消失,并出現(xiàn)一個(gè)名為 CIRCUITPY 的新磁盤(pán)驅(qū)動(dòng)器。

就這樣,您就完成了! :)

軟件

現(xiàn)在在CPB上安裝了 CircuitPython ,我們可以繼續(xù)安裝項(xiàng)目軟件。

安裝Bluefruit Connect和Neopixel庫(kù)

項(xiàng)目代碼需要兩個(gè)代碼庫(kù)才能協(xié)助藍(lán)牙通訊。 點(diǎn)擊下面的鏈接以下載CircuitPython庫(kù)捆綁包:

庫(kù)捆綁包

解壓縮庫(kù)捆綁包,然后打開(kāi)其中的 lib 文件夾。

找到名為 adafruit_bluefruit_connect 的文件夾和名為的文件neopixel.mpy – 兩者復(fù)制并將它們粘貼到 CIRCUITPY 驅(qū)動(dòng)器的 lib 文件夾。

安裝BLE庫(kù)

要下載我們需要的最后一個(gè)庫(kù),請(qǐng)單擊下面的按鈕:

BLE庫(kù)

解壓縮,已下載的zip文件,并打開(kāi)其中的 lib 文件夾。復(fù)制名為 adafruit_ble 的文件夾,并將其粘貼到 CIRCUITPY 驅(qū)動(dòng)器的 lib 文件夾中。

您的CIRCUITPY驅(qū)動(dòng)器的文件結(jié)構(gòu)現(xiàn)在應(yīng)該看起來(lái)像這樣:

上傳代碼

復(fù)制下面的代碼并將其粘貼到新文本文件中。

將文本文件另存為 code.py 到 CIRCUITPY的根目錄中驅(qū)動(dòng)器。

下載:Project Zip 或代碼.py | 在Github上查看

復(fù)制代碼

“”“

LED Disco Tie with Bluetooth

=========================================================

Give your suit an sound-reactive upgrade with Circuit

Playground Bluefruit & Neopixels. Set color and animation

mode using the Bluefruit LE Connect app.

Author: Collin Cunningham for Adafruit Industries, 2019

”“”

# pylint: disable=global-statement

import time

import array

import math

import audiobusio

import board

import neopixel

from adafruit_ble.uart_server import UARTServer

from adafruit_bluefruit_connect.packet import Packet

from adafruit_bluefruit_connect.color_packet import ColorPacket

from adafruit_bluefruit_connect.button_packet import ButtonPacket

uart_server = UARTServer()

# User input vars

mode = 0 # 0=audio, 1=rainbow, 2=larsen_scanner, 3=solid

user_color= (127,0,0)

# Audio meter vars

PEAK_COLOR = (100, 0, 255)

NUM_PIXELS = 10

CURVE = 2

SCALE_EXPONENT = math.pow(10, CURVE * -0.1)

NUM_SAMPLES = 160

# Restrict value to be between floor and ceiling.

def constrain(value, floor, ceiling):

return max(floor, min(value, ceiling))

# Scale input_value between output_min and output_max, exponentially.

def log_scale(input_value, input_min, input_max, output_min, output_max):

normalized_input_value = (input_value - input_min) / \

(input_max - input_min)

return output_min + \

math.pow(normalized_input_value, SCALE_EXPONENT) \

* (output_max - output_min)

# Remove DC bias before computing RMS.

def normalized_rms(values):

minbuf = int(mean(values))

samples_sum = sum(

float(sample - minbuf) * (sample - minbuf)

for sample in values

return math.sqrt(samples_sum / len(values))

def mean(values):

return sum(values) / len(values)

def volume_color(volume):

return 200, volume * (255 // NUM_PIXELS), 0

# Set up NeoPixels and turn them all off.

pixels = neopixel.NeoPixel(board.A1, NUM_PIXELS, brightness=0.1, auto_write=False)

pixels.fill(0)

pixels.show()

mic = audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA,

sample_rate=16000, bit_depth=16)

# Record an initial sample to calibrate. Assume it‘s quiet when we start.

samples = array.array(’H‘, [0] * NUM_SAMPLES)

mic.record(samples, len(samples))

# Set lowest level to expect, plus a little.

input_floor = normalized_rms(samples) + 10

# Corresponds to sensitivity: lower means more pixels light up with lower sound

input_ceiling = input_floor + 500

peak = 0

def wheel(wheel_pos):

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

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

if wheel_pos 《 0 or wheel_pos 》 255:

r = g = b = 0

elif wheel_pos 《 85:

r = int(wheel_pos * 3)

g = int(255 - wheel_pos*3)

b = 0

elif wheel_pos 《 170:

wheel_pos -= 85

r = int(255 - wheel_pos*3)

g = 0

b = int(wheel_pos*3)

else:

wheel_pos -= 170

r = 0

g = int(wheel_pos*3)

b = int(255 - wheel_pos*3)

return (r, g, b)

def rainbow_cycle(delay):

for j in range(255):

for i in range(NUM_PIXELS):

pixel_index = (i * 256 // NUM_PIXELS) + j

pixels[i] = wheel(pixel_index & 255)

pixels.show()

time.sleep(delay)

def audio_meter(new_peak):

mic.record(samples, len(samples))

magnitude = normalized_rms(samples)

# Compute scaled logarithmic reading in the range 0 to NUM_PIXELS

c = log_scale(constrain(magnitude, input_floor, input_ceiling),

input_floor, input_ceiling, 0, NUM_PIXELS)

# Light up pixels that are below the scaled and interpolated magnitude.

pixels.fill(0)

for i in range(NUM_PIXELS):

if i 《 c:

pixels[i] = volume_color(i)

# Light up the peak pixel and animate it slowly dropping.

if c 》= new_peak:

new_peak = min(c, NUM_PIXELS - 1)

elif new_peak 》 0:

new_peak = new_peak - 1

if new_peak 》 0:

pixels[int(new_peak)] = PEAK_COLOR

pixels.show()

return new_peak

pos = 0 # position

direction = 1 # direction of “eye”

def larsen_set(index, color):

if index 《 0:

return

else:

pixels[index] = color

def larsen(delay):

global pos

global direction

color_dark = (int(user_color[0]/8), int(user_color[1]/8),

int(user_color[2]/8))

color_med = (int(user_color[0]/2), int(user_color[1]/2),

int(user_color[2]/2))

larsen_set(pos - 2, color_dark)

larsen_set(pos - 1, color_med)

larsen_set(pos, user_color)

larsen_set(pos + 1, color_med)

if (pos + 2) 《 NUM_PIXELS:

# Dark red, do not exceed number of pixels

larsen_set(pos + 2, color_dark)

pixels.write()

time.sleep(delay)

# Erase all and draw a new one next time

for j in range(-2, 2):

larsen_set(pos + j, (0, 0, 0))

if (pos + 2) 《 NUM_PIXELS:

larsen_set(pos + 2, (0, 0, 0))

# Bounce off ends of strip

pos += direction

if pos 《 0:

pos = 1

direction = -direction

elif pos 》= (NUM_PIXELS - 1):

pos = NUM_PIXELS - 2

direction = -direction

def solid(new_color):

pixels.fill(new_color)

pixels.show()

def map_value(value, in_min, in_max, out_min, out_max):

out_range = out_max - out_min

in_range = in_max - in_min

return out_min + out_range * ((value - in_min) / in_range)

speed = 6.0

wait = 0.097

def change_speed(mod, old_speed):

new_speed = constrain(old_speed + mod, 1.0, 10.0)

return(new_speed, map_value(new_speed, 10.0, 0.0, 0.01, 0.3))

while True:

# While BLE is *not* connected

if not uart_server.connected:

# OK to call again even if already advertising

uart_server.start_advertising()

# While BLE is connected

else:

if uart_server.in_waiting:

packet = Packet.from_stream(uart_server)

# Received ColorPacket

if isinstance(packet, ColorPacket):

user_color = packet.color

# Received ButtonPacket

elif isinstance(packet, ButtonPacket):

if packet.pressed:

if packet.button == ButtonPacket.UP:

speed, wait = change_speed(1, speed)

elif packet.button == ButtonPacket.DOWN:

speed, wait = change_speed(-1, speed)

elif packet.button == ButtonPacket.BUTTON_1:

mode = 0

elif packet.button == ButtonPacket.BUTTON_2:

mode = 1

elif packet.button == ButtonPacket.BUTTON_3:

mode = 2

elif packet.button == ButtonPacket.BUTTON_4:

mode = 3

# Determine animation based on mode

if mode == 0:

peak = audio_meter(peak)

elif mode == 1:

rainbow_cycle(0.001)

elif mode == 2:

larsen(wait)

elif mode == 3:

solid(user_color)

“”“

LED Disco Tie with Bluetooth

=========================================================

Give your suit an sound-reactive upgrade with Circuit

Playground Bluefruit & Neopixels. Set color and animation

mode using the Bluefruit LE Connect app.

Author: Collin Cunningham for Adafruit Industries, 2019

”“”

# pylint: disable=global-statement

import time

import array

import math

import audiobusio

import board

import neopixel

from adafruit_ble.uart_server import UARTServer

from adafruit_bluefruit_connect.packet import Packet

from adafruit_bluefruit_connect.color_packet import ColorPacket

from adafruit_bluefruit_connect.button_packet import ButtonPacket

uart_server = UARTServer()

# User input vars

mode = 0 # 0=audio, 1=rainbow, 2=larsen_scanner, 3=solid

user_color= (127,0,0)

# Audio meter vars

PEAK_COLOR = (100, 0, 255)

NUM_PIXELS = 10

CURVE = 2

SCALE_EXPONENT = math.pow(10, CURVE * -0.1)

NUM_SAMPLES = 160

# Restrict value to be between floor and ceiling.

def constrain(value, floor, ceiling):

return max(floor, min(value, ceiling))

# Scale input_value between output_min and output_max, exponentially.

def log_scale(input_value, input_min, input_max, output_min, output_max):

normalized_input_value = (input_value - input_min) / \

(input_max - input_min)

return output_min + \

math.pow(normalized_input_value, SCALE_EXPONENT) \

* (output_max - output_min)

# Remove DC bias before computing RMS.

def normalized_rms(values):

minbuf = int(mean(values))

samples_sum = sum(

float(sample - minbuf) * (sample - minbuf)

for sample in values

return math.sqrt(samples_sum / len(values))

def mean(values):

return sum(values) / len(values)

def volume_color(volume):

return 200, volume * (255 // NUM_PIXELS), 0

# Set up NeoPixels and turn them all off.

pixels = neopixel.NeoPixel(board.A1, NUM_PIXELS, brightness=0.1, auto_write=False)

pixels.fill(0)

pixels.show()

mic = audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA,

sample_rate=16000, bit_depth=16)

# Record an initial sample to calibrate. Assume it’s quiet when we start.

samples = array.array(‘H’, [0] * NUM_SAMPLES)

mic.record(samples, len(samples))

# Set lowest level to expect, plus a little.

input_floor = normalized_rms(samples) + 10

# Corresponds to sensitivity: lower means more pixels light up with lower sound

input_ceiling = input_floor + 500

peak = 0

def wheel(wheel_pos):

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

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

if wheel_pos 《 0 or wheel_pos 》 255:

r = g = b = 0

elif wheel_pos 《 85:

r = int(wheel_pos * 3)

g = int(255 - wheel_pos*3)

b = 0

elif wheel_pos 《 170:

wheel_pos -= 85

r = int(255 - wheel_pos*3)

g = 0

b = int(wheel_pos*3)

else:

wheel_pos -= 170

r = 0

g = int(wheel_pos*3)

b = int(255 - wheel_pos*3)

return (r, g, b)

def rainbow_cycle(delay):

for j in range(255):

for i in range(NUM_PIXELS):

pixel_index = (i * 256 // NUM_PIXELS) + j

pixels[i] = wheel(pixel_index & 255)

pixels.show()

time.sleep(delay)

def audio_meter(new_peak):

mic.record(samples, len(samples))

magnitude = normalized_rms(samples)

# Compute scaled logarithmic reading in the range 0 to NUM_PIXELS

c = log_scale(constrain(magnitude, input_floor, input_ceiling),

input_floor, input_ceiling, 0, NUM_PIXELS)

# Light up pixels that are below the scaled and interpolated magnitude.

pixels.fill(0)

for i in range(NUM_PIXELS):

if i 《 c:

pixels[i] = volume_color(i)

# Light up the peak pixel and animate it slowly dropping.

if c 》= new_peak:

new_peak = min(c, NUM_PIXELS - 1)

elif new_peak 》 0:

new_peak = new_peak - 1

if new_peak 》 0:

pixels[int(new_peak)] = PEAK_COLOR

pixels.show()

return new_peak

pos = 0 # position

direction = 1 # direction of “eye”

def larsen_set(index, color):

if index 《 0:

return

else:

pixels[index] = color

def larsen(delay):

global pos

global direction

color_dark = (int(user_color[0]/8), int(user_color[1]/8),

int(user_color[2]/8))

color_med = (int(user_color[0]/2), int(user_color[1]/2),

int(user_color[2]/2))

larsen_set(pos - 2, color_dark)

larsen_set(pos - 1, color_med)

larsen_set(pos, user_color)

larsen_set(pos + 1, color_med)

if (pos + 2) 《 NUM_PIXELS:

# Dark red, do not exceed number of pixels

larsen_set(pos + 2, color_dark)

pixels.write()

time.sleep(delay)

# Erase all and draw a new one next time

for j in range(-2, 2):

larsen_set(pos + j, (0, 0, 0))

if (pos + 2) 《 NUM_PIXELS:

larsen_set(pos + 2, (0, 0, 0))

# Bounce off ends of strip

pos += direction

if pos 《 0:

pos = 1

direction = -direction

elif pos 》= (NUM_PIXELS - 1):

pos = NUM_PIXELS - 2

direction = -direction

def solid(new_color):

pixels.fill(new_color)

pixels.show()

def map_value(value, in_min, in_max, out_min, out_max):

out_range = out_max - out_min

in_range = in_max - in_min

return out_min + out_range * ((value - in_min) / in_range)

speed = 6.0

wait = 0.097

def change_speed(mod, old_speed):

new_speed = constrain(old_speed + mod, 1.0, 10.0)

return(new_speed, map_value(new_speed, 10.0, 0.0, 0.01, 0.3))

while True:

# While BLE is *not* connected

if not uart_server.connected:

# OK to call again even if already advertising

uart_server.start_advertising()

# While BLE is connected

else:

if uart_server.in_waiting:

packet = Packet.from_stream(uart_server)

# Received ColorPacket

if isinstance(packet, ColorPacket):

user_color = packet.color

# Received ButtonPacket

elif isinstance(packet, ButtonPacket):

if packet.pressed:

if packet.button == ButtonPacket.UP:

speed, wait = change_speed(1, speed)

elif packet.button == ButtonPacket.DOWN:

speed, wait = change_speed(-1, speed)

elif packet.button == ButtonPacket.BUTTON_1:

mode = 0

elif packet.button == ButtonPacket.BUTTON_2:

mode = 1

elif packet.button == ButtonPacket.BUTTON_3:

mode = 2

elif packet.button == ButtonPacket.BUTTON_4:

mode = 3

# Determine animation based on mode

if mode == 0:

peak = audio_meter(peak)

elif mode == 1:

rainbow_cycle(0.001)

elif mode == 2:

larsen(wait)

elif mode == 3:

solid(user_color)

項(xiàng)目代碼一旦保存 到 CIRCUITPY 作為 code.py, 軟件已全部設(shè)置好了–是時(shí)候繼續(xù)組裝硬件。

準(zhǔn)備N(xiāo)eoPixels

首先要做的是修剪Neopixel LED條以使其與領(lǐng)帶的長(zhǎng)度相匹配。 20“分離式領(lǐng)帶的長(zhǎng)度可以為 9 NeoPixels 。如果使用其他領(lǐng)帶,請(qǐng)確保在切割前找到合適的長(zhǎng)度。

《表類(lèi)=“ build-table”》

常規(guī)剪刀可以被拖拉或損壞,因此請(qǐng)確保使用一對(duì)鋼絲鉗或?qū)榍懈罱饘俣O(shè)計(jì)的剪刀。

我們將在下圖中用紅色虛線表示的兩個(gè)點(diǎn)處剪切條。

剪切輸入線

從條形板上剪下公型插針連接器(將2根多余的電線垂到一側(cè))。切近連接器本身以增加長(zhǎng)度。這是將要連接到Circuit Playground藍(lán)果的條帶的末端。

使用剝線鉗移除大約 15mm 》從每根剛切割的導(dǎo)線的末端開(kāi)始絕緣。

輕輕地扭曲每捆線束,以防止它們磨損。

刪除多余的新像素

從您剛剪切的一端開(kāi)始,算出長(zhǎng)度為 9 NeoPixels 。

剪切第九個(gè) neopixel之后的條帶,并留有盡可能多的尾巴。

不要在此末端剝皮或分開(kāi)導(dǎo)線。

完成后,完成條應(yīng)類(lèi)似于上圖。

添加電池袋

為了安全地容納脂電池,我們將在領(lǐng)帶的背面創(chuàng)建一個(gè)簡(jiǎn)單的袋。 p》

此口袋將使用熱激活下擺帶固定在領(lǐng)帶上,但您可以根據(jù)需要使用傳統(tǒng)縫制輕松地重新制作它。

剪切并排列材料

切一塊布 60mm 尺寸 x 75mm 。

剪切4條下擺帶 2 x 75mm ,和 2 x 15mm

將下擺帶的各部分按照領(lǐng)帶的底部附近的口袋形狀排列后縫。

小心地小心地將放在口袋頂部的中間位置,在口袋底部的中間留出空隙。 。 確保膠帶在口袋的外邊緣–熨燙后將無(wú)法重新放置它。

鐵袋就位

輕輕地放置一塊在所有物品上刮擦織物,以在熨燙時(shí)保護(hù)袖珍織物。

用熱鐵施加確定壓力 10次到20秒來(lái)回移動(dòng)熨斗,將口袋均勻地固定到位。

完成后,請(qǐng)檢查并確??诖耆o貼到領(lǐng)帶。

組裝和接線

用針和線以及一點(diǎn)點(diǎn)接線組裝所有組件。

位置新像素帶

找到領(lǐng)帶的垂直中心線并標(biāo)記

將條帶沿中心線放置,使大約一英寸的導(dǎo)線懸掛領(lǐng)帶的尖端。

塞住靠近脖子的金屬絲條的多余的尾巴到領(lǐng)帶的結(jié)。

縫制NeoPixel s

通過(guò)將線程穿過(guò)織物的頂層并將其包裹起來(lái),將每個(gè)NeoPixel縫合到位NeoPixel膠囊的一端。然后對(duì)膠囊的另一端進(jìn)行相同操作。

要在工作時(shí)保持條帶對(duì)齊,請(qǐng)先縫制NeoPixels的頂部,底部和中間。

附加賽道游樂(lè)場(chǎng)Bluefruit

安裝螺栓到CPB的 GND , VOUT 和 A1 焊盤(pán)。將它們稍稍松動(dòng),以便稍后可以輕松地將電線繞在螺釘上。

將CPB放在扎帶背面的底部,以便微型USB端口稍微扎在扎帶的折線下方。

通過(guò)將 GND 和 3.3V 焊盤(pán)牢固地縫合到織物的頂層,將CPB縫制到位。

接線圖

下面是顯示所有需要進(jìn)行的電氣連接。單擊圖像可查看大圖。

連接NeoPixel地帶

NeoPixel帶中的三根導(dǎo)線連接到CPB上的以下焊盤(pán):

紅色導(dǎo)線- 》 VOUT

中間線-》 A1

剩余線-》 GND

彎曲在綁帶底部邊緣上的導(dǎo)線,并固定 裸露的導(dǎo)線 》用小螺絲刀擰緊螺栓。

將脂狀電池滑入口袋,同時(shí)將其電線連接器穿過(guò)口袋末端的開(kāi)口。

將電池連接到CPB上的黑色JST端口。

祝賀您-您的新領(lǐng)帶已經(jīng)通電并且可以穿了!

使用

下載應(yīng)用

Adafruit的Bluefruit LE Connect應(yīng)用是免費(fèi)的,這是多方面的Bluetooth LE工具包,我們將使用它來(lái)控制領(lǐng)帶的照明和動(dòng)畫(huà)。在以下移動(dòng)設(shè)備上下載并安裝該應(yīng)用:

iOS版下載

Android版下載

通過(guò)BLE連接

確保您的移動(dòng)設(shè)備已啟用藍(lán)牙,然后啟動(dòng)該應(yīng)用。啟動(dòng)屏幕將顯示該應(yīng)用可以連接到的附近藍(lán)牙LE設(shè)備的列表。

查找名稱(chēng)以 CIRCUITPY 開(kāi)頭的設(shè)備,然后單擊右側(cè)按鈕上的連接。

連接后,點(diǎn)擊標(biāo)題為 Controller 的表格行。這是我們用來(lái)控制領(lǐng)帶的顏色和動(dòng)畫(huà)的模塊。

更改動(dòng)畫(huà)

領(lǐng)帶具有4種動(dòng)畫(huà)模式:

Audio Meter -CPB檢測(cè)到的現(xiàn)場(chǎng)聲音水平

彩虹周期-所有LED在整個(gè)光譜范圍內(nèi)都會(huì)褪色

拉森掃描器-LED上下移動(dòng),呈“賽隆”風(fēng)格

單色-全部相同顏色的LED

在 Controller 視圖中,點(diǎn)擊 Control Pad 。游戲控制器按鈕界面將會(huì)出現(xiàn)。

以下是每個(gè)控制面板按鈕的功能細(xì)分:

按鈕1 –更改為音頻計(jì)模式

按鈕2 –更改為彩虹周期模式

按鈕3 –更改為L(zhǎng)arsen Scanner模式

按鈕4 –更改為純色模式

向上箭頭按鈕-加快Larsen Scanner

向下箭頭按鈕-放慢Larsen Scanner

更改顏色

在控制器視圖中,點(diǎn)擊拾色器 –將出現(xiàn)色輪界面。 Color Picker (顏色選擇器)可讓您更改 Larsen Scanner 和 Solid Color 動(dòng)畫(huà)模式的顏色。

觸摸色輪上的一個(gè)點(diǎn)以選擇一種色調(diào),然后拖動(dòng)下面的滑塊來(lái)調(diào)整顏色亮度。按下發(fā)送按鈕,將顏色數(shù)據(jù)發(fā)送到領(lǐng)帶。
責(zé)任編輯:wv

聲明:本文內(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)注

    243

    文章

    24596

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評(píng)論

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

    在昉·星光開(kāi)發(fā)板上控制WS2812B彩燈環(huán)

    :24珠WS2812B環(huán) 杜邦線:若干 三、彩燈環(huán)使用原理 本次課程中,使用的彩燈環(huán)模塊具體如下: 在燈環(huán)的接口上,除了VCC(+)和GND(-),還有DIN用于
    發(fā)表于 03-06 06:15

    XINGLIGHT 成興光 幻LED 珠#幻漸變 #RGB彩燈

    RGB
    成興光電子
    發(fā)布于 :2026年02月27日 16:28:33

    合科泰RFL系列厚膜工藝貼片電阻的核心優(yōu)勢(shì)和應(yīng)用場(chǎng)景

    隨著智能照明、裝飾工程與工業(yè)場(chǎng)景照明的快速發(fā)展,LED市場(chǎng)規(guī)模持續(xù)增長(zhǎng)。然而,LED的設(shè)
    的頭像 發(fā)表于 02-10 14:38 ?464次閱讀

    博通LED條:設(shè)計(jì)與應(yīng)用的全面指南

    博通LED條:設(shè)計(jì)與應(yīng)用的全面指南 作為電子工程師,我們?cè)谠O(shè)計(jì)項(xiàng)目時(shí)經(jīng)常會(huì)用到各種LED條。今天就來(lái)詳細(xì)聊聊博通(Broadcom)的HLCP-x100和HLMP-2xxx系列
    的頭像 發(fā)表于 12-30 15:30 ?258次閱讀

    原廠  FZH03 內(nèi)控同步功能的三通道LED固定18mA恒流驅(qū)動(dòng)IC

    是具有內(nèi)控同步功能的三通道LED固定18mA恒流驅(qū)動(dòng)IC,信號(hào)輸入斷開(kāi)后實(shí)現(xiàn)同步固定七花樣變化,可防止芯片損壞導(dǎo)致的后續(xù)級(jí)聯(lián)芯片不工作。同時(shí)適合制作全內(nèi)控條,無(wú)需控制器。芯片內(nèi)部集
    發(fā)表于 11-12 09:16

    LED離線語(yǔ)音控制方案WTK6900P

    在家居裝飾以及部分公共空間裝飾已LED經(jīng)成為了一種主流的燈飾方案,今天我們主要講的是家居內(nèi)部空間的控制,因?yàn)楣膊糠值臒艟卟贿m用語(yǔ)音
    的頭像 發(fā)表于 09-15 17:31 ?999次閱讀

    彩光影新體驗(yàn)HTR7216 (S)、HTR7198 (S)、HTR7144 (S) 智能操控力原廠技術(shù)支持一級(jí)代理聚能芯半導(dǎo)體

    HTR7216 (S)、HTR7198 (S)、HTR7144 (S) RGB 矩陣驅(qū)動(dòng),憑借卓越性能,為你的產(chǎn)品增添獨(dú)特魅力。 軟硬件全兼容Ax20216/Ax20198/Ax20144
    發(fā)表于 08-12 17:54

    2.4 A 三通道閃光 LED 驅(qū)動(dòng)器, I<sup>2</sup>C 控制接口 skyworksinc

    電子發(fā)燒友網(wǎng)為你提供()2.4 A 三通道閃光 LED 驅(qū)動(dòng)器, I2C 控制接口相關(guān)產(chǎn)品參數(shù)、數(shù)據(jù)手冊(cè),更有2.4 A 三通道閃光
    發(fā)表于 07-30 18:30
    2.4 A 三通道閃光<b class='flag-5'>燈</b> <b class='flag-5'>LED</b> 驅(qū)動(dòng)器,<b class='flag-5'>帶</b> I<sup>2</sup>C 控制接口 skyworksinc

    2.4 A / 2 A 雙路獨(dú)立閃光 LED 驅(qū)動(dòng)器, TrueFlash? skyworksinc

    電子發(fā)燒友網(wǎng)為你提供()2.4 A / 2 A 雙路獨(dú)立閃光 LED 驅(qū)動(dòng)器, TrueFlash?相關(guān)產(chǎn)品參數(shù)、數(shù)據(jù)手冊(cè),更有2.4 A / 2 A 雙路獨(dú)立閃光
    發(fā)表于 07-30 18:30
    2.4 A / 2 A 雙路獨(dú)立閃光<b class='flag-5'>燈</b> <b class='flag-5'>LED</b> 驅(qū)動(dòng)器,<b class='flag-5'>帶</b> TrueFlash? skyworksinc

    LED珠來(lái)料檢驗(yàn)

    珠是LED燈具最核心的原物料,直接決定了燈具的性能和可靠性。大多LED照明廠商出于投資回報(bào)比的考量,并未采購(gòu)專(zhuān)業(yè)的微觀結(jié)構(gòu)檢測(cè)設(shè)備,也缺乏材料學(xué)科的專(zhuān)業(yè)技術(shù)人員。LED
    的頭像 發(fā)表于 07-24 11:30 ?2064次閱讀
    <b class='flag-5'>LED</b><b class='flag-5'>燈</b>珠來(lái)料檢驗(yàn)

    【新品發(fā)布】新一代艾為燈語(yǔ),具備情緒感知的多維彩燈效

    音樂(lè)律動(dòng)算法及對(duì)應(yīng)的SoC產(chǎn)品,可實(shí)現(xiàn)聲音同步“音隨我動(dòng)”、“彗星擺尾”、“流光溢”、具備情緒感知的多維彩燈效,已在多款車(chē)型量產(chǎn)。"艾為燈語(yǔ)"系列目前累計(jì)產(chǎn)品
    的頭像 發(fā)表于 06-27 19:09 ?1081次閱讀
    【新品發(fā)布】新一代艾為燈語(yǔ),具備情緒感知的多維<b class='flag-5'>炫</b>彩燈效

    LED桿屏與常規(guī)LED顯示屏的區(qū)別

    LED桿屏與常規(guī)LED顯示屏的區(qū)別
    的頭像 發(fā)表于 03-21 08:45 ?1141次閱讀
    <b class='flag-5'>LED</b><b class='flag-5'>燈</b>桿屏與常規(guī)<b class='flag-5'>LED</b>顯示屏的區(qū)別