Cov txheej txheem:

Tobias - Arduino Music Box With TVout: 5 Cov Kauj Ruam (nrog Duab)
Tobias - Arduino Music Box With TVout: 5 Cov Kauj Ruam (nrog Duab)

Video: Tobias - Arduino Music Box With TVout: 5 Cov Kauj Ruam (nrog Duab)

Video: Tobias - Arduino Music Box With TVout: 5 Cov Kauj Ruam (nrog Duab)
Video: It Became Unliveable! ~ Abandoned Home Of The Spenser's In The USA 2024, Hlis ntuj nqeg
Anonim
Tobias - Arduino Music Box Nrog TVout
Tobias - Arduino Music Box Nrog TVout
Tobias - Arduino Music Box Nrog TVout
Tobias - Arduino Music Box Nrog TVout
Tobias - Arduino Music Box Nrog TVout
Tobias - Arduino Music Box Nrog TVout

Ua ntej tshaj plaws, cia kuv qhia Tobias, kuv tus hluas nkauj tus menyuam roj hmab loj heev, uas yog qhov kev tshoov siab rau txoj haujlwm no.

Tobias muaj tus cwm pwm, txhim kho lub sijhawm thaum peb tso dag tso dag hauv peb lub siab tias nws ua dab tsi thaum nws tsis mus ua haujlwm.

Txoj haujlwm no tau npaj los ua khoom plig yooj yim, Arduino nrog tus hais lus piezo ua si nws cov nkauj nyiam. Ceev nrooj nws tawm ntawm kuv txoj kev tswj thiab dhau los ua lub npov suab paj nruag:

  • 3D luam tawm
  • muaj peev xwm ua suab paj nruag yam tsis xav tau kev txuas USB siv roj teeb AA
  • nrog piano "cov yuam sij" uas pom nrog txhua daim ntawv
  • muaj peev xwm rov tsim cov duab ntawm lub qub CRT TV ntawm RCA txuas

Khoom siv

  • Arduino Nano Cov
  • Hais lus (Kuv coj nws los ntawm lub xov tooj cua qub puas)
  • Toggle Hloov (3 tus pin) - hom xaiv
  • Teb Potentiometer - kev tswj ntim
  • 2 x 220Ω resistor
  • 1x 440Ω resistor lossis 2x 220Ω resistor
  • 1 x 1 kΩ resistor
  • 113mm coj
  • 2x RCA poj niam txuas
  • xov hlau
  • 3.5mm dawb acrylic
  • kub kua nplaum los yog super kua nplaum

Cov Cuab Yeej:

  • cov khoom siv soldering
  • 3D tshuab luam ntawv
  • khoos phis tawj nrog Arduino IDE txhawm rau upload cov cai

Kauj ruam 1: Code - Upload

Koj yuav xav tau:

  • TVout tsev qiv ntawv - tso cai rau Arduino tso cov duab thiab suab hauv TV nrog RCA lossis SCART kev txuas
  • arduino -volume1 - Lub tsev qiv ntawv no txhim kho lub suab zoo, nws tau siv hauv hom 1 (Arduino ib leeg tsis muaj TV txuas). Txawm li cas los xij, hauv hom 2, nws tsis tuaj yeem siv nws tib lub sijhawm zoo li TVout lub tsev qiv ntawv siv tib lub sijhawm raws li ntim 1

Yog tias koj xav hloov lub suab paj nruag lossis duab pom cov kauj ruam tom ntej, yog tias tsis yog xa cov cai rau koj Arduino, tab sis ua ntej ua ntej kom ntseeg tau tias koj muaj ob lub tsev qiv ntawv teeb tsa.

Kauj ruam 2: Txoj Cai (hloov lub Suab Nkauj)

Code (hloov Music)
Code (hloov Music)

Ntawm no koj tuaj yeem pom zaj nkauj:

Kuv faib cov nkauj hauv ntu, muab cov ntawv rau txhua ntu uas rov ua nws tus kheej. Tom qab ntawd kuv tau muab tus nqi ntawm 1 txog 16 rau txhua daim ntawv thiab muab tso rau ntawm kab 0 ntawm txhua kab. Tus nqi sib xws rau qhov zaus ntawm daim ntawv yuav tsum tau ua (array freq ). Hauv kab 1 Kuv muab lub sijhawm ntawm txhua daim ntawv sau tseg saum toj no. Piv txwv:

const byte melB1 [2] [6] PROGMEM = {

{11, 8, 0, 8, 7, 6}, // note

{1, 3, 1, 1, 1, 1}}; // ntev

Yog koj xav siv lwm zaj nkauj:

  • hloov qhov freq array nrog qhov tshiab xav tau zaus (sau ntawv)
  • hloov cov arrays coj mus rau txhua feem ntawm zaj nkauj
  • hauv suab paj nruag tsis muaj dab tsi () xaiv qhov kev txiav txim uas yuav tsum tau ua
  • hloov qhov "X" hauv kab lus tshaj tawm rau cov lej ntawm txhua kab thiab tseem hloov pauv qhov tsis sib xws, piv txwv:

melB1 [2] [X]

tsis muaj dab tsi melodiaB1 () {

rau (a = 0; a <X; a ++) {

Kauj Ruam 3: Txoj Cai (hloov daim Duab / Duab)

Code (hloov daim duab / Duab)
Code (hloov daim duab / Duab)
Code (hloov daim duab / Duab)
Code (hloov daim duab / Duab)
Code (hloov daim duab / Duab)
Code (hloov daim duab / Duab)

Kuv siv GIMP los hloov daim duab rau dub thiab dawb, cov kauj ruam:

Xim / Xim = 0

Cov duab yuav tsum tau hloov mus rau 95x95 pixel daws teeb meem. Lub tsev qiv ntawv TVout tso cai rau kev daws teeb meem siab dua tab sis vim qhov loj me ntawm cov cai kuv xav siv, Kuv raug yuam kom txo qhov kev daws teeb meem.

  • Plaub fab Xaiv Cov Cuab Yeej (Piv Piv - tsau 1: 1)
  • Kho/Luam
  • Ntaub ntawv/Tsim/Los ntawm Clipboard
  • Duab/Nplai Duab (95x95)

Nws yog qhov yuav tsum tau hloov cov duab rau dub thiab dawb thiab tsis yog xim dub.

  • Fuzzy Xaiv Cov Cuab Yeej thiab Xaiv Cov Cuab Yeej Dawb los xaiv thaj chaw uas kuv xav kom tshwm rau hauv cov xim dub.
  • Mem hluav (dub) kom ua rau peb xaiv dub
  • Xaiv / Hloov (hloov pauv peb xaiv)
  • Mem hluav (dawb) los pleev xim rau thaj tsam seem dawb
  • Xim / Brightness-Contrast (sib piv rau max kom ntseeg tau tias dub yog dub)

Tam sim no peb muaj cov duab dub thiab dawb nrog daws teeb meem ntawm 95x95 pixels

Cov Ntaub Ntawv/Export Raws Li (. BMP)

Txhawm rau hloov cov duab tshiab rau tus lej Kuv siv Image2Code

Uas muab rau peb yuav luag zoo array. Tom qab ntawd kuv tau theej thiab muab nws tso rau hauv Arduino IDE.

Siv kho kom raug / Nrhiav:

  • tshawb rau txhua qhov "0xFF" thiab hloov nws nrog "0" (Hloov Txhua Yam)
  • ua tib yam rau "0x00" thiab hloov nws nrog "1"
  • Rho tawm txhua "{" thiab "}"

"0" yuav yog pixel dub

"1" yuav yog lub pixel dawb

Kauj Ruam 4: Qauv 3D

Qauv 3D
Qauv 3D

Txhawm rau tsim lub thawv 3D qauv kuv siv SketchUp. Vim qhov txwv ntawm kuv lub tshuab luam ntawv 3D thiab qhov nyuaj kuv xav tias nws yuav ua rau kev sib txuas sab hauv kuv txiav txim siab los tsim cov qauv hauv 4 ntu.

Kuv tau tshaj tawm SketchUp cov ntaub ntawv yog tias koj xav hloov qee yam ntawm kev tsim, yog tias tsis yog, tsuas yog luam cov ntawv.stl

Kauj ruam 5: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Kev sib sau ua ke tsis yog qhov nyuaj tab sis nws nyuaj vim qhov loj ntawm lub thawv thiab qhov ntau ntawm cov xov hlau uas yuav txuas nrog.

Pom zoo: