Cov txheej txheem:

ArduinOLED: 5 Kauj Ruam (nrog Duab)
ArduinOLED: 5 Kauj Ruam (nrog Duab)

Video: ArduinOLED: 5 Kauj Ruam (nrog Duab)

Video: ArduinOLED: 5 Kauj Ruam (nrog Duab)
Video: RGB-LED ansteuern | Arduino-Tutorial #5 2024, Hlis ntuj nqeg
Anonim
ArduinOLED
ArduinOLED
ArduinOLED
ArduinOLED
ArduinOLED
ArduinOLED

ArduinOLED yog lub platform rau cov khoom siv hluav taws xob thiab lwm yam haujlwm. Nws suav nrog lub vijtsam OLED, tus joystick, qee lub nyees khawm, lub suab nrov, thiab tus nab kuab txuas cov ntsiab lus los cuam tshuam nrog ntau lwm yam khoom siv. Mus ntsib https://johanv.xyz/ArduinOLED yog xav paub ntxiv.

Cov ntawv qhia no qhia txog yuav teeb tsa software rau pawg thawj coj. Txhawm rau kawm paub yuav ua li cas thiaj xaj cov khoom thiab tsim lub rooj tsavxwm, mus saib

Kauj Ruam 1: Txhim Kho Arduino IDE

Txhim kho Arduino IDE
Txhim kho Arduino IDE
Txhim kho Arduino IDE
Txhim kho Arduino IDE

Mus ntsib Arduino Software Page thiab nyem rau kab ntawv txuas rau koj lub operating system.

Kuv xaiv "Windows Installer", tab sis yog tias koj tsis muaj admin nkag, rub tawm "Windows ZIP cov ntaub ntawv rau tsis yog admin teeb tsa".

Nyem "Yog" thaum nws nug koj yog tias lub app yuav tsum raug tso cai hloov pauv. Tom qab ntawv nyem "Tom ntej" kom txog thaum cov kauj ruam ua tiav.

Kauj ruam 2: Rub tawm Lub Tsev Qiv Ntawv

Rub tawm Cov Tsev Qiv Ntawv
Rub tawm Cov Tsev Qiv Ntawv
Rub tawm Cov Tsev Qiv Ntawv
Rub tawm Cov Tsev Qiv Ntawv
Rub tawm Cov Tsev Qiv Ntawv
Rub tawm Cov Tsev Qiv Ntawv

Koj xav tau peb lub tsev qiv ntawv los siv ArduinOLED: U8g2 library, DirectIO library, thiab ArduinOLED library.

U8g2 lub tsev qiv ntawv

Qhib Arduino IDE thiab nyem "Sketch", tom qab ntawd "suav nrog Lub Tsev Qiv Ntawv", tom qab ntawd "Tswj Cov Tsev Qiv Ntawv …"

Ntaus "U8g2" hauv kab tshawb nrhiav thiab nyem "Nruab".

Tom qab nws teeb tsa, nyem "Kaw".

DirectIO Library

Lub tsev qiv ntawv DirectIO muab txoj hauv kev nrawm dua los teeb I pins ntawm Arduino yog tias tus lej tus lej yog qhov tas li. Nws xav tau los ntawm ArduinOLED lub tsev qiv ntawv hauv qib tom ntej.

mmarchetti/DirectIO DirectIO - Yooj yim, yooj yim I/O tsev qiv ntawv rau Arduino GitHub

Mus rau qhov txuas saum toj no, nyem rau "Clone lossis Download" khawm, tom qab ntawv nyem "Download ZIP".

Xwb, nyem qhov txuas no txhawm rau rub tawm ZIP cov ntaub ntawv:

github.com/mmarchetti/DirectIO/archive/master.zip

Tom qab ntawd, hauv Arduino IDE, nyem "Sketch", "Include Library", tom qab ntawd "Ntxiv. ZIP Library".

Nkag mus rau "Downloads" nplaub tshev, xaiv "DirectIO-master.zip" uas koj nyuam qhuav rub tawm, thiab nyem "Qhib".

Lub Tsev Kawm Ntawv ArduinOLED

Lub tsev qiv ntawv ArduinOLED tau sau los ntawm kuv tshwj xeeb rau pawg no. Kev teeb tsa zoo ib yam li DirectIO hauv cov kauj ruam dhau los.

johanvandegriff/ArduinOLED Library rau ArduinOLED board. GitHub

Mus rau qhov txuas saum toj no, nyem rau "Clone lossis Download" khawm, tom qab ntawv nyem "Download ZIP".

Xwb, nyem qhov txuas no txhawm rau rub tawm ZIP cov ntaub ntawv:

github.com/johanvandegriff/ArduinOLED/archive/master.zip

Tom qab ntawd, hauv Arduino IDE, nyem "Sketch", "Include Library", tom qab ntawd "Ntxiv. ZIP Library".

Nkag mus rau "Downloads" nplaub tshev, xaiv "ArduinOLED-master.zip" uas koj nyuam qhuav rub tawm, thiab nyem "Qhib".

Yeem: Mus rau Arduino cov tsev qiv ntawv tais ceev tseg (Cov Ntaub Ntawv/Arduino/tsev qiv ntawv) thiab hloov npe "DirectIO-master" rau "DirectIO" thiab "ArduinOLED-master" rau "ArduinOLED".

Kauj Ruam 3: Txuas rau Programmer Cable

Plug rau hauv Programmer Cable
Plug rau hauv Programmer Cable
Plug rau hauv Programmer Cable
Plug rau hauv Programmer Cable

Saib tom qab ntawm tus programmer thiab pom tus pin sau tias "GND". Ua ib daim ntawv ntawm tus pin xim.

Tom qab ntawd ntsaws lub xov tooj mus rau hauv nruab nrab 4 tus pin ntawm qhov txuas ntawm ArduinOLED lub rooj tsavxwm, ua kom ntseeg tau tias cov xim koj tau sau tseg yog nyob rau sab sau "GND".

Thaum kawg, ntsaws USB kawg ntawm tus programmer cable rau hauv koj lub computer.

Kauj Ruam 4: Tshaj Tawm Cov Qauv Piv Txwv

Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches
Tshaj Tawm Cov Piv Txwv Sketches

Nyem rau "File", "Piv txwv", "ArduinOLED", tom qab ntawd "ArduinOLED_u8g2_StackerGame".

Nyem rau ntawm "Cov cuab yeej", "Pawg", tom qab ntawd "Arduino Pro lossis Pro Mini".

Nyem rau ntawm "Tools", "Processor", tom qab ntawd "ATmega328 (5V, 16MHz)".

Nyem rau ntawm "Cov Cuab Yeej", "Chaw Nres Nkoj", tom qab ntawd xaiv qhov chaw nres nkoj uas pom thaum lub xov tooj txuas nrog.

Tuav lub pob ntawv sau "RST" ntawm ArduinOLED board.

Nyem rau "Upload" khawm hauv Arduino IDE.

Thaum qhov xwm txheej hloov pauv los ntawm "Sib Sau …" thiab "Uploading …", tso lub pob "RST".

Cov ntawv yuav tsum tshwm ntawm qhov screen.

Nrog koj zoo siab! Koj ua nws!

Koj yuav pom tias qhov qhab nias siab tshaj rau qhov kev ua si yog 255. Txhawm rau rov pib dua nws, tuav lub pob "R" thaum lub zog ArduinOLED nce (txawm yog los ntawm lub zog hloov lossis khawm rov pib dua). Koj yuav pom ib qho screen qhia koj tias qhov qhab nia siab tau rov pib dua.

Kauj Ruam 5: Cov Kauj Ruam Tom ntej

  • Sim tawm lwm qhov piv txwv piv txwv
  • Sim ua qee qhov ntawm lwm txoj haujlwm tau teev tseg ntawm

Pom zoo: