Cov txheej txheem:

Paj Huam Lub Plawv Hauv Qhov Tseeb: 4 Kauj Ruam
Paj Huam Lub Plawv Hauv Qhov Tseeb: 4 Kauj Ruam

Video: Paj Huam Lub Plawv Hauv Qhov Tseeb: 4 Kauj Ruam

Video: Paj Huam Lub Plawv Hauv Qhov Tseeb: 4 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Paj Huam Lub Siab in Motion
Paj Huam Lub Siab in Motion

Hauv "A Charlie Brown Valentine", cov menyuam tau txais cov lus sib tham hauv lub siab thiab nyeem lawv. Charlie tus viv ncaus nyeem tag nrho sonnet los ntawm nws. Nws yuav tsum tau tig nws ntau thiab ntau dua. Kuv xav tias nws yuav lom zem los ua ib qho uas tuaj yeem ua tau. Kuv siv tib lub sonnet, tab sis koj tuaj yeem sau koj li paj huam. Nws yuav lom zem rau kev thov lossis kev tshaj tawm.

Txoj haujlwm no siv Adafruit's Circuit Playground Express (CPX) los tsav 2 OLED cov lus. CPX qhov ua kom nrawm nrawm tau siv los tshuaj xyuas thaum ib tus neeg nqa nws lossis hloov nws dua. Txhua lub sijhawm nws tau hloov pauv, cov lus nthuav tawm mus rau kab tom ntej ntawm cov paj huam.

Khoom siv

Lub plawv zoo li lub npov zoo li lub thawv chocolate lossis 3D luam tawm ib qho (cov ntaub ntawv stl muab)

Electronics

  • Adafruit Circuit Chaw Ua Si Express
  • 2x OLED cov lus qhia xws li Adafruit SSD1306 oled
  • Li-Ion Roj teeb lossis lwm lub zog siv

Software

  • Arduino IDE & cov tsev qiv ntawv ntxiv
  • kos duab cov ntaub ntawv (.ino) muab

Cov cuab yeej

  • Soldering hlau
  • Kub kua nplaum phom

Kauj Ruam 1: Kev Sib Txuas Hauv Hluav Taws Xob

Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob
Kev Sib Txuas Hluav Taws Xob

Xyuas kom txhua OLED muaj qhov chaw nyob sib txawv. Koj yuav xav tau rov muag jumper ntawm cov zaub. Qhov ntawd tsuas yog txoj haujlwm nyuaj hauv txoj haujlwm no. Txhua yam ntxiv hauv txoj haujlwm no yog qib yooj yim. Rau kev siv ntawm nplai, lub jumper me me tau qhia nrog nyiaj npib thiab cov nplej.

Txuas cov lus qhia mus rau Circuit Playground Express (CPX) raws li qhia hauv kab duab kab. Nco tseg, koj yuav tsis xav ua qhov txuas xiav yog tias koj OLED tsis muaj tus pin rov pib dua. Yog tias koj siv Adafruit's OLED, koj yuav tsum ua qhov kev sib txuas no. Qhov chaw nyob ntawm koj tus OLED yuav txawv, yog li nco ntsoov nyeem cov ntawv cim.

  • Dub GND
  • Liab +3V
  • Daj SCL
  • Txiv kab ntxwv SDA
  • Xiav RST / A0

Kauj ruam 2: Programming- IDE Teeb

Txoj haujlwm no siv tus qauv Arduino IDE los ua haujlwm Circuit Circuit Playground Express (CPX). Nws kuj tseem xav tau ob peb lub tsev qiv ntawv ntxiv: 2 Adafruit tso saib Cov Tsev Qiv Ntawv & SAMD Boards tsav tsheb.

Yog tias koj tsis muaj cov tsev qiv ntawv no, txoj hauv kev yooj yim tshaj plaws los ntawm cov cuab yeej ntawv qhia zaub mov, xaiv Tswj Cov Tsev Qiv Ntawv. Nyob rau hauv lub thawv nco-down hom, xaiv koom nrog. Hauv lub thawv ntawv nco-down lub thawv, xaiv zaub. Muab Adafruit tso rau hauv lub thawv tshawb nrhiav. Ob lub tsev qiv ntawv koj yuav xav ntxiv yog Adafruit GFX lub tsev qiv ntawv thiab Adafruit SSD1306.

Ib yam li ntawd, koj yuav tsum tau ntxiv CPX pawg thawj coj nrog Tus Thawj Saib Xyuas Haujlwm. Los ntawm Cov cuab yeej ntawv qhia zaub mov, xaiv Board menu (lossis Board: "your default board") kom tau txais cov ntawv qhia zaub mov nco. Xaiv Pawg Thawj Coj. Koj yuav tsum teeb tsa Arduino SAMD Boards version 1.6.16 lossis tom qab. Ntaus Arduino SAMD hauv kab ntawv tshawb fawb saum toj, tom qab ntawd thaum koj pom qhov nkag, nyem Nruab.

Kuv pom zoo kom koj rov pib dua Arduino IDE. Yog tias koj siv lub qhov rais, koj yuav xav tau teeb tsa cov tsav tsheb ntxiv. Adafruit muaj cov lus qhia zoo.

Kauj ruam 3: Programming- Text Customization

Siv Elizabeth Barrett Browning's Sonnet 43 ("Kuv hlub koj li cas? Cia kuv suav txoj hauv kev …") lossis ua raws cov theem no txhawm rau kho koj tus kheej cov ntawv.

Qhov kev pabcuam muab cov lus khaws tseg raws li cov hlua. Txoj cai yuav tshaj tawm cov lus ib txoj hlua ntawm ib lub sijhawm txhua lub sijhawm lub plawv tig rov qab. Qhov kab ntawm cov hlua no tsuas yog qhov sib txawv uas koj xav tau hloov los ua nws koj tus kheej. Koj kuj tseem xav hloov cov ntawv me me. Cov ntawv loj uas siv hauv txoj cai yog me dua li qhia hauv daim duab npog. Xav txog cov ntawv hauv qab no nrog thawj ob txoj hlua ntawm cov paj huam:

int textSize = 1;

String Poem = {"\ n / n" "Kuv hlub koj li cas? / N / n" "Cia kuv suav / n txoj kev. / N / n (dhau ->)", "Kuv hlub koj / n "" qhov tob thiab dav / n "" thiab qhov siab Kuv tus plig / n "" tuaj yeem ncav cuag, thaum / n "" kev xav tsis pom / n / n (dhau ->) ", Qhov sib txawv ntawm cov ntawv tuaj yeem yog 1, 2, lossis 3, nrog 3 yog qhov loj me uas pom ntawm daim duab npog qhov project. Loj 1 me me heev, tab sis tseem nyeem tau ntawm qhov zoo OLED.

Txawm hais tias nws zoo li ntau dua, tsuas yog thawj 2 txoj hlua ntawm cov paj huam tau qhia saum toj no. Yog tias txoj kab xaus hauv "thiab kab tom ntej pib nrog", txoj hlua txuas mus ntxiv. Txhawm rau cais cov hlua, yuav tsum siv tus lej cim.

Teeb meem teeb tsa txoj hlua: Qhov / n yuav zoo li coj txawv txawv me ntsis. Xws li nws hauv txoj hlua yuam txoj kab tshiab. Yog tsis muaj nws koj cov ntawv yuav qhwv, tab sis nws yuav tawg nyob nruab nrab ntawm ib lo lus. / N yog paub tias yog tus ua cim khiav. Lwm cov cim khiav dim muaj txiaj ntsig yog / t rau tab thiab / 'rau ib nqe lus nkaus xwb. (Cov paj huam no muaj ib nqe lus nkaus xwb). Ib qho teeb meem kev teeb tsa ntxiv uas koj yuav ntsib yog feem pua kos npe. Koj yuav tsum ua nws ob npaug xwb (%%). Kuv vam tias kuv tuaj yeem txuas mus rau qhov ua tau zoo ntawm kev siv ntawm arduino.cc site. Txog tam sim no qhov zoo tshaj plaws kuv tau pom yog ntawm Wikipedia. Yog tias koj muaj kev nyiam siv online, thov qhia tawm.

Kauj Ruam 4: Case-shaped Case

Lub plawv zoo li Case
Lub plawv zoo li Case

Txawm hais tias koj siv lub thawv luam ntawv 3D lossis lub thawv khoom qab zib, Kuv pom zoo kom kho cov lus tso rau hauv qhov chaw thaum lawv nyob. Qhov no yuav pab koj ua kom lawv ncaj thiab koj yuav tsis yuam kev rub nws rov qab. Siv daim kab xev hluav taws xob los npog cov neeg sib tiv thiab tiv thaiv cov khoom, suav nrog roj teeb.

Cov ntawv luam tawm 3D muab kev txhawb nqa cov lus qhia nrog cov ntaub qhwv. Siv cov kua nplaum kub rau ntawm cov ntaub qhwv. Qhov CPX pawg thawj coj tau muab ntsia nrog ob lub ntsia hlau 2.5mm. Pastel acrylic xim tuj lub thawv ua rau nws zoo li lub plawv sib tham.

Pom zoo: