Mundarija:
- 1 -qadam: 5110LCD displeyining xususiyatlari va ulanishi
- 2 -qadam: BMP FILE
- 3 -qadam: KOD
- 4 -qadam: Ko'rganingiz uchun RAHMAT
Video: LCD5110 grafik ta'limi: 4 qadam
2024 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2024-01-31 10:26
Hammaga salom
Men bu ta'limda LCD5110_GRAPH kutubxonasi va Bitmap grafikasi funktsiyalari bilan tanishmoqchiman. Men shunday qaror qildim, chunki agar siz mening sahifamda "Space Race Game" loyihasini ko'rsangiz, men sizga bitmap grafikasini qanday yasashni ko'rsatmaganman. Boshlaylik…
1 -qadam: 5110LCD displeyining xususiyatlari va ulanishi
Xususiyatlari:
- 84 × 48 piksel
- Faqat 3.3V
Ulanish:
- VCC -> Arduino 3.3V (yoki 5v)
- BL -> Arduino pin 3 (pwm pin)
- GND -> Arduino GND
- CLK (SCLK) -> Arduino pin 8
- Din (MOSI) -> Arduino pin 9
- DC -> Arduino pin 10
- Idoralar yoki CS -> Arduino pin 12
- RST (RESET) -> Arduino pin 11
2 -qadam: BMP FILE
Sizga bmp faylini qanday yaratishni asta -sekin ko'rsataman.
1-Grafika yarating, men buning uchun Photo Editor-dan foydalanaman:
- Foto muharririga kiring
- "Yangi yaratish" tugmachasini kiriting
- Kenglik = 84 va balandlik = 48 ni tanlang
- O'zingiz xohlagan narsani chizib oling
- -j.webp" />
2-j.webp
- -j.webp" />
- Konvertatsiya qilish
- Saqlash
3-.c faylini yarating. Buning uchun men LCD yordamchisidan foydalanaman:
- Dowland
- "Fayl" tugmachasini, so'ng "Rasmni yuklash" ni kiriting.
- "Chiqishni saqlash" ni kiriting
- . C formatini saqlashga ishonch hosil qiling
4 -c faylini ishlatadigan kod papkasiga joylashtiring.
3 -qadam: KOD
Men 5110LCD_Graph dan foydalanaman va sizga ba'zi funktsiyalarni ko'rsataman. Agar siz barcha funktsiyalarni o'rganmoqchi bo'lsangiz, pdf faylini toping.
#include // kutubxonani o'z ichiga oladi
tashqi uint8_t SAT ; //.c faylini tasvirlab bering
int BL = 3; // orqa nuri tasvirlab bering
LCD5110 lcd (8, 9, 10, 11, 12); // LCD5110 nomi (clk, din, DC, rst, ce);
bo'sh o'rnatish () {
pinMode (BL, OUTPUT); lcd. InitLCD (); // nomi. InitLCD (); lcd.setContrast (55) ekranini ishga tushiring; //name.setContrast (); kontrastni o'rnatish (0 dan 127 gacha)}
void loop () {
analogWrite (BL, 330); lcd.clrScr (); // ism.clrScr (); lcd.drawBitmap ekranini tozalash (0, 0, SAT, 84, 48); //name.drawBitmap(x, y, nomi (.c), kengligi (.c), balandligi (.c)); lcd.update (); // ism.update (); ekranni yangilang}
// --------------------- Yangi jadval yaratish ------------------------ ------------------------ // LCD yordamchisi yaratgan fayl // https://en.radzio.dxp.pl/bitmap_converter/ //- -------------------------------------------------- --------------------------- #include // PROGMEMdan foydalanish uchun ushbu kutubxonani o'z ichiga oladi // PROGMEM kichik RAMdan foydalanishga yordam beradi.] PROGMEM = {0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F. 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFB, 0xFF, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F. 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xFF, 0xF7, 0xFF, 0x1F, 0x1F, 0x1F, 0x17, 0x1E, 0x1E, 0x1F, 0x1F, 0x1F,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, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0FFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0FFF 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,};
4 -qadam: Ko'rganingiz uchun RAHMAT
O'qiganingiz uchun katta rahmat! Agar sizda biron bir savol bo'lsa, men bilan bog'laning yoki sharh yozing …
Tavsiya:
Arduino MIDI ritm bo'limi sekanseri: 8 qadam (rasmlar bilan)
Arduino MIDI ritm bo'limi sekanseri: Yaxshi dasturiy tambur mashinasiga ega bo'lish bugungi kunda oson va arzon, lekin sichqonchani ishlatish men uchun zavqni yo'qotadi. Shu sababli, men dastlab 12 xil baraban elementini ishga tushirishga qodir bo'lgan 64 bosqichli MIDI baraban sekvenseri sifatida mo'ljallangan narsani tushundim
Ob -havo stantsiyasi: ESP8266 chuqur uyquda, SQL, kolba va grafik bo'yicha grafik: 3 qadam
Ob -havo stantsiyasi: ESP8266 chuqur uyquda, SQL, kolbadan chizish va chizish: Balkoningizdagi harorat, namlik yoki yorug'lik intensivligini bilish qiziq bo'larmidi? Men bilardim. Shunday qilib, men bunday ma'lumotlarni to'plash uchun oddiy ob -havo stantsiyasini yaratdim. Keyingi bo'limlar men yaratgan qadamlardir. Boshlaylik
OAREE - 3D bosma - muhandislik ta'limi uchun to'siqlardan qochadigan robot (OAREE) Arduino bilan: 5 qadam (rasmlar bilan)
OAREE - 3D bosma - muhandislik ta'limi uchun to'siqlardan qochadigan robot (OAREE) Arduino bilan: OAREE (muhandislik ta'limi uchun to'siqlardan qochuvchi robot) Dizayn: Bu ko'rsatmaning maqsadi oddiy/ixcham bo'lgan OAR (to'siqdan qochuvchi robot) robotini loyihalash edi. 3D bosib chiqarish, yig'ish oson, harakatlanish uchun uzluksiz aylanish servolaridan foydalanadi
DIYMall RFID-RC522 va Nokia LCD5110 ni Arduino bilan ishlatish bo'yicha yana bir ko'rsatma: 8 qadam (rasmlar bilan)
DIYMall RFID-RC522 va Nokia LCD5110-ni Arduino-dan foydalanish bo'yicha yana bir ko'rsatma: Nima uchun men DIYMall RFID-RC522 va Nokia LCD5110 uchun boshqa ko'rsatma yaratishga ehtiyoj sezdim? Rostini aytsam, men o'tgan yili bu ikkita qurilmadan foydalanib, kontseptsiya isboti ustida ishlaganman va qandaydir tarzda "noto'g'ri"
Windows -ni Mac -da Mac bo'limi bilan tashqi haydovchiga o'rnatish: 5 qadam (rasmlar bilan)
Windows -ni Mac -da Mac Partition yordamida tashqi haydovchiga o'rnatish: Agar siz MacBook pro -ni sotib olgan bo'lsangiz va ozgina pulni tejagan bo'lsangiz, lekin tez orada Bootcamp -dan foydalanib derazalarni o'rnatmoqchi bo'lganingizda, xotira muammosiga duch keldingiz. Hammamiz bilamizki, 128 gb etarli emas. Bular, ehtimol, biz biror narsa sotib olardik