Cov txheej txheem:

DIY Photo Frame Nrog Arduino: 5 Kauj Ruam
DIY Photo Frame Nrog Arduino: 5 Kauj Ruam

Video: DIY Photo Frame Nrog Arduino: 5 Kauj Ruam

Video: DIY Photo Frame Nrog Arduino: 5 Kauj Ruam
Video: I Fixed My Masterpiece 2024, Kaum ib hlis
Anonim
Image
Image
DIY Duab Ncej Nrog Arduino
DIY Duab Ncej Nrog Arduino

Nyob zoo cov phooj ywg zoo siab txais tos rau Lwm Cov Lus Qhia! Nov yog Nick los ntawm educ8s.tv thiab niaj hnub no peb tab tom tsim qhov no me me tab sis zoo nkauj digital thav duab siv Arduino.

Kuv siv 1.8 xim ST7735 TFT tso saib ntau heev. Qhov laj thawj yog vim li cas cov zaub no siv tau yooj yim heev, nws raug nqi tsawg dua $ 5 thiab nws muaj xim! Nyob tom qab, cov zaub muaj daim npav SD daim npav, yog li Kuv xav tias peb yuav tsum kawm paub siv nws zoo li cas. Raws li nws tau tawm los, nws yog qhov yooj yim heev los siv daim npav SD daim npav ntawm cov zaub! Qhov ntawd ua rau cov zaub no zoo dua.

Qhov haujlwm uas peb yuav tsim hnub no yog qhov no. Ib daim duab yooj yim uas thauj cov duab los ntawm SD daim npav. Kuv tau tso qee cov duab.bmp rau ntawm daim npav SD thiab qhov haujlwm thauj khoom rau lawv thiab nthuav tawm lawv ntawm cov zaub hauv xim tag nrho! Raws li koj tuaj yeem pom qhov nrawm ntawm txoj haujlwm yog siab heev yog tias peb txiav txim siab tias lub paj hlwb ntawm txoj haujlwm no yog Arduino Nano qub thiab qeeb. Hauv kuv lub tswv yim, qhov no zoo heev. Tab sis tam sim no cia saib yuav tsim txoj haujlwm no li cas.

Kauj Ruam 1: Tau Txais Txhua Qhov

Tau Txhua Qhov
Tau Txhua Qhov

Cov ntu xav tau txhawm rau txhawm rau tsim txoj haujlwm no yog cov no:

  • Ib qho Arduino Nano ▶
  • 1.8 "ST7735 Zaub ▶
  • Ib daim ntawv me me ▶
  • Qee cov xov hlau ▶
  • Ib daim npav SD

Yeem Tsis Tau:

Powerbank ▶

Tus nqi ntawm txoj haujlwm nyob ib puag ncig $ 15 tab sis kuv paub tseeb tias koj twb muaj qee qhov ntawm cov khoom no yog li koj tuaj yeem tsim txoj haujlwm no nrog nyiaj tsawg dua. Koj tuaj yeem pom qhov txuas rau txhua ntu hauv qhov kev piav qhia ntawm daim vis dis aus. Cia saib yuav tsim txoj haujlwm no li cas.

Kauj Ruam 2: 1.8 "ST7735 Xim TFT

Image
Image
Qhov 1.8
Qhov 1.8
Qhov 1.8
Qhov 1.8
Qhov 1.8
Qhov 1.8

Ua ntej tshaj plaws ST7735 Xim TFT zaub yog qhov khoom pheej yig heev. Nws raug nqi ib ncig $ 5, thiab nws muaj kev txhawb nqa lub tsev qiv ntawv zoo. Kuv tau siv nws ntau ntawm kuv cov phiaj xwm, thiab kuv xav tias nws zoo heev!

Tsis tas li ntawd, cov zaub muaj kev daws teeb meem ntawm 160 × 128 pixels, thiab nws tuaj yeem tso saib 65,000 xim. Nws siv SPI interface los tham nrog Arduino cov laug cam. Ntxiv rau qhov ntawd, nws ua haujlwm tau zoo nrog txhua qhov muaj nyob hauv Arduino, zoo li Arduino Uno, Arduino Mega, thiab Arduino Due. Nws kuj tseem ua haujlwm zoo nrog ESP8266 raws cov laug cam, zoo li Wemos D1 thiab Wemos D1 mini board.

Tsis tas li, kev siv hluav taws xob ntawm lub rooj tsavxwm nyob ib puag ncig 50mA ntawm qhov tam sim no uas tsis phem rau kuv qhov kev xav. Peb tuaj yeem yooj yim siv lub rooj tsav xwm no los tsim cov phiaj xwm siv roj teeb uas tsis tas yuav muaj nyob txhua lub sijhawm. Hauv qhov xaus, qhov no yog ib qho zoo tshaj plaws Arduino qhia yog tias koj xav tau xim thiab tus nqi qis.

Kuv tau npaj cov lus qhia ntxaws txog 1.8 ″ ST7735 Xim TFT zaub. Kuv tau muab daim vis dis aus tso rau hauv cov kauj ruam no.

Kauj ruam 3:

Duab
Duab
Duab
Duab
Duab
Duab
Duab
Duab

Txhawm rau siv daim npav SD daim npav nrog Arduino, peb yuav tsum txuas 4 tus pin sab saum toj ntawm cov zaub nrog Arduino.

Kuv tau muab qee tus poj niam lub taub hau txuas rau lawv thiab peb tau npaj txuas lawv. Daim npav SD siv tus txheej txheem SPI txhawm rau sib txuas lus nrog Arduino. Yog li peb yuav tsum siv kho vajtse SPI tus pin ntawm Arduino Nano.

Zaub SD Card Pins - Arduino pins

SD_CS ▶ Digital Pin 4

SD_MOSI ▶ Digital Pin 11

SD_MISO ▶ Digital Pin 12

SD_SCK ▶ Digital Pin 13

Tam sim no peb tau npaj los txuas cov pins hauv qab ntawm cov zaub. Txhawm rau pom yuav ua li cas txuas cov zaub txhawm rau txheeb xyuas cov vis dis aus, Kuv tau txuas nrog cov kauj ruam dhau los. Ob qho zaub thiab SD daim npav siv siv SPI tus pin yog li ntawm qee qhov Arduino SPI pins peb tau txuas ob lub xov hlau!

Zaub Qab Pins - Arduino pins

Arduino LED ▶ 3.3V

CSK -D13

SDA ▶ D11

A0 ▶ D9

RESET ▶ D8

CS -D10 tau

GND thiab GND

VCC ▶ 5V

OK, tam sim no peb tau npaj los txhawb lub phiaj xwm. Raws li koj tuaj yeem pom, txhua yam ua haujlwm raws li xav tau thiab cov duab tau tshwm ntawm qhov screen ib qho dhau ib qho.

Kauj ruam 4:

Duab
Duab
Duab
Duab

Tam sim no cia saib software sab ntawm qhov haujlwm.

Txhawm rau ua tiav qhov txiaj ntsig no, peb yuav tsum siv Adafruit lub tsev qiv ntawv rau ST7735 zaub. Peb kuj xav tau Adafruit GFX lub tsev qiv ntawv. Adafruit tau ua txoj haujlwm zoo nrog lub tsev qiv ntawv rau ST7735.

ST7735 Lub Tsev Qiv Ntawv:

GFX Library:

Qhov piv txwv spitftbitmap thauj cov duab los ntawm daim npav SD thiab qhia nws ntawm cov zaub. Kuv hloov kho tus lej me me txhawm rau txhawm rau txuas mus ib txhis, thauj cov duab ntau dua thiab siv kev coj ua toj roob hauv pes ntawm cov zaub.

void voj () {

bmpDraw ("logo.bmp", 0, 0);

ncua (3000); bmpDraw ("mezapos.bmp", 0, 0); ncua (3000); bmpDraw ("sparti.bmp", 0, 0); ncua (3000); bmpDraw ("mani.bmp", 0, 0); ncua (3000); bmpDraw ("lisbon.bmp", 0, 0); ncua (3000);

}

Raws li ib txwm koj tuaj yeem pom cov cai ntawm txoj haujlwm txuas nrog rau theem no.

Nrog bmpDraw muaj nuj nqi uas tus piv txwv muab peb tuaj yeem yooj yim thauj khoom thiab tso saib cov duab bitmap hauv peb cov phiaj xwm! Koj yuav tsum paub tseeb tias, tias koj cov bitmaps muaj hom ntawv raug.

Txhawm rau hloov cov duab los kho qhov raug rau qhov haujlwm no, Kuv tau siv Paint.net dawb software rau lub qhov rais. Kuv thauj kuv cov duab thiab tom qab ntawd kuv tau hloov pauv hauv qhov kev daws teeb meem raug rau cov zaub uas yog 160x128 pixels. Tom qab ntawd kuv tau khaws cov duab ua.bmp cov ntaub ntawv nrog qhov tob me ntsis ntawm 24bits. Qhov ntawd yog txhua yam peb yuav tsum ua tam sim no yog kom txuag lawv rau hauv daim npav SD thiab hu cov lus txib bmpDraw nrog lub npe ntawm cov ntawv.

Kauj ruam 5:

Duab
Duab

Raws li koj tuaj yeem pom, peb nrawm tsim cov phiaj xwm txaus siab siv Arduino. Cov zaub no tau dhau los ua kuv nyiam vim nws yooj yim siv thiab muab ntau npaum li cas rau tus nqi qis. Nws lub tsev qiv ntawv txhawb nqa zoo heev, yog li kuv yuav siv nws sai dua. Kuv tab tom npaj lwm qhov kev qhia txog cov zaub no sai sai no, kom pom yuav ua li cas thauj cov duab, thiab yuav kos cov duab yooj yim li cas.

Kuv yuav nyiam hnov koj lub tswv yim txog cov zaub no. Koj puas siv nws hauv koj cov phiaj xwm? Yog tias muaj, koj puas muaj cov txuj ci qhia rau peb? Thov tshaj tawm koj cov lus hauv kab lus hauv qab no. Ua tsaug!

Pom zoo: