Cov txheej txheem:
- Kauj Ruam 1: Cov ntaub ntawv peb xav tau los sau
- Kauj ruam 2: SOFTWERE NEEDED
- Kauj Ruam 3: Tus Kheej PIN thiab QHOV CHAW TSHWJ XEEB
- Kauj ruam 4:
- Kauj Ruam 5: Nrog koj zoo siab Peb tes num tau npaj tam sim no
Video: Raspberry Pi Oled Moos Saib Nws hnov Nws thiab hnov Nws: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Nov yog lub moos ntse uas qhia lub sijhawm ntawm OLED cov duab thiab koj tseem tuaj yeem hnov lub sijhawm ntawm lub sijhawm sib txawv uas yog pab puv rau qhov muag tsis pom thiab Nws tseem hloov cov xim coj nrog lub sijhawm zoo li lub teeb tsaus ntuj thaum tsaus ntuj mus rau txiv kab ntxwv rau daj thiab zoo li qhov ntawd. Qhov haujlwm no tawm mus heev peb yuav siv OLed nrog nws thiab lom zem heev nrog nws.
Kauj Ruam 1: Cov ntaub ntawv peb xav tau los sau
Cov ntaub ntawv peb xub xav tau los sau
- 2 lub thawv zoo li hauv daim duab lossis koj tuaj yeem xaiv raws li koj xaiv
- Raspberry pi txhua version (Kuv tau siv A+)
- Hais lus nrog amplifier
- Roj teeb lossis lub hwj chim mini
- O LED zaub (Kuv tau siv OLED ssd1063)
- R. G. B coj
- Kua nplaum thiab Kub kua nplaum
- Cov ntawv dawb los yog cov ntawv tuab
Kauj ruam 2: SOFTWERE NEEDED
- Rasbiam lossis Noobs ntawm Raspberry pi
- Python Gpio tsev qiv ntawv tau teeb tsa hauv pi
- Python ssd oled Library
Nruab Ssd OLed txuas los ntawm muab txuas oled liberary txuas
github.com/adafruit/Adafruit_Python_SSD130…
Tau txais font siv hauv txoj haujlwm los ntawm qhov txuas hauv qab no
github.com/xxlukas42/RPI_SSD1306
Kauj Ruam 3: Tus Kheej PIN thiab QHOV CHAW TSHWJ XEEB
Txuas thiab kho qhov O. Led zaub thiab R. G. B coj hauv lub thawv raws li qhia hauv pics.
koj tuaj yeem txuas thiab kho Oled zaub raws li koj tus kheej tsim
Kev Txuas Tus PIN ntawm O. LED DISPLAY OF RASPBERRY
Raspberry pi Board tus pin O.led Zaub
Pin 3 -------------- ---------------------- SDA
pin 5 ------------------------------- SCL
GND ------------------------------ GND
3V -------------------------------- VCC
RGB LED mus rau PI CONNECTION
comman +tus pin rau 3v raspberry pi
Liab ------------- 35
Ntsuab ----------- 33
Xiav ------------- 37
Kauj ruam 4:
PYTHON CODE LINK
github.com/ASHWINISINHA/pi-oled-intelligen…
Downlode Python cov ntawv sau los ntawm kab ntawv saum toj no thiab khiav cov ntawv run1.py los ntawm Terminal rau lub sijhawm xim xim
Khiav lub run2.py los ntawm lub davhlau ya nyob twg rau LED xim raws sijhawm
import timeimport os
sijhawm ntshuam Adafruit_GPIO. SPI li SPI i
mport Adafruit_SSD1306 los ntawm lub sijhawm ntshuam gmtime, strftime
los ntawm PIL ntshuam duab
los ntawm PIL ntshuam ImageDraw
los ntawm PIL ntshuam ImageFont
# Raspberry Pi tus pin teeb tsa:
RST = 24 # Nco tseg cov hauv qab no tsuas yog siv nrog
SPI: DC = 23 SPI_PORT = 0 SPI_DEVICE = 0
showtime = strftime (" %a %d %b %Y sijhawm %X thib ob", gmtime ())
def poj niam (ntawv nyeem):
os.system ("espeak" " + ntawv +" "")
poj niam (sijhawm ua yeeb yam) # 128x32 zaub nrog kho vajtse I2C: #
disp = Adafruit_SSD1306. SSD1306_128_32 (rst = RST)
disp = Adafruit_SSD1306. SSD1306_128_64 (rst = RST) disp.begin ()
# Ntshiab cov zaub. disp.clear () disp.display ()
dav = disp.width qhov siab = disp.height duab = Image.new ('1', (dav, qhov siab))
# Tau txais cov khoom kos los kos duab. kos = ImageDraw. Draw (duab)
# Kos lub thawv ntim dub kom pom cov duab. draw.rectangle ((0, 0, dav, qhov siab), tus qauv = 0, sau = 0)
# Kos ib co duab. # Ua ntej txhais qee qhov tsis tu ncua tso cai yooj yim hloov pauv ntawm cov duab. padding = 2 shape_width = 20 sab saum toj = padding hauv qab = qhov siab-padding # txav mus rau sab xis kom taug qab txoj haujlwm x tam sim no rau kev kos duab. x = padding # Kos tus ellipse.
# Thauj khoom font tsis raug. font = ImageFont.load_default () font = ImageFont.truetype ('Montserrat-Light.ttf', 14) font2 = ImageFont.truetype ('Montserrat-Light.ttf', 20) font_text_big = ImageFont.truetype ('Montserrat-Nruab Nrab. txf, 30)
thaum muaj tseeb: kos.rectangle ((0, 0, dav, qhov siab), tus qauv = 0, sau = 0) kos.text ((x, saum), str (strftime (" %a %d %b %Y", gmtime ())), font = font, fill = 455) kos.text ((x, saum+39), str (strftime (" %a %d", gmtime ())), font = font2, sau = 455) kos.text ((x, saum+12), str (strftime (" %X", gmtime ())), font = font_text_big, sau = 455) showtime = strftime (" %a %d %b %Y sijhawm %X thib ob ", gmtime ()) def poj niam (ntawv nyeem): os.system (" espeak "" + text + "'") poj niam (showtime) disp.image (duab) disp.display () time.sleep (1)
Downlode tag nrho nab hab sej tsab ntawv los ntawm no
github.com/ASHWINISINHA/pi-oled-intelligen…
github.com/ASHWINISINHA/pi-oled-intelligent-clock
Kauj Ruam 5: Nrog koj zoo siab Peb tes num tau npaj tam sim no
Pom zoo:
Arduino Av Av Nthuav Saib Xyuas Ntoo - Tsis txhob hnov qab Dej Koj Cov Nroj Tsuag: 4 Cov Kauj Ruam (nrog Duab)
Arduino Av Av Nthuav Saib Xyuas Ntoo - Tsis Txhob hnov qab Dej Koj Cov Nroj Tsuag: Koj puas hnov qab dej hauv koj cov nroj tsuag sab hauv? Lossis tej zaum koj ua tib zoo saib xyuas thiab tso dej rau lawv? Yog tias koj ua, tom qab ntawd koj yuav tsum ua koj tus kheej lub roj teeb-siv av noo noo ntsuas xyuas. Tus saib xyuas no siv cov av noo uas muaj peev xwm
Saib Xyuas thiab Sau Kub Nrog Bluetooth LE thiab RaspberryPi: 9 Kauj Ruam (nrog Duab)
Saib Xyuas thiab Sau Kub Nrog Bluetooth LE thiab RaspberryPi: Cov lus qhia no yog hais txog yuav ua li cas ua ke ntau qhov ntsuas kub ntsuas nrog Bluetooth LE sensor kab laum los ntawm Blue Radios (BLEHome) thiab RaspberryPi 3BT ua tsaug rau kev txhim kho ntawm Bluetooth LE tus qauv, muaj tam sim no tuaj yeem siv tau
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Info: 4 Cov Kauj Ruam
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws … Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Cov Lus Qhia: yog tias koj tau mus rau lub vev xaib thiab nws ua nkauj nkauj uas koj nyiam thiab xav tau nws ntawm no yog cov lus qhia rau koj tsis yog kuv qhov txhaum yog tias koj cuam tshuam qee yam (tsuas yog txoj hauv kev nws yuav tshwm sim yog tias koj pib tshem cov khoom yam tsis muaj laj thawj. ) Kuv tuaj yeem tau txais cov nkauj rau
Cov Neeg Hais Lus Tsis Txaus Dej Uas Ntab - " Nws Ntws, Nws Totes thiab Nws Pob Zeb Sau Ntawv! &Quot;: 7 Cov Kauj Ruam (nrog Duab)
Cov Neeg Hais Lus Tsis Txaus Dej Uas Ntab - " Nws Ntws, Nws Totes thiab Nws Pob Zeb Sau Ntawv! ). Peb yuav ntab hauv tus dej, lossis txuas kab rau ntawm ntug dej kom peb cov ntab nyob ntawm qhov chaw peb nyob. Txhua tus neeg
Cov Lily Hluav Taws Xob lossis Tus Pin Ruaj Ntseg: Yuav Ua Li Cas Kom Nyab Xeeb thiab Saib Zoo Ua Nws: 9 Kauj Ruam (nrog Duab)
Lub Lily Hluav Taws Xob lossis Tus Pin Ruaj Ntseg: Yuav Ua Li Cas Kom Nyab Xeeb thiab Saib Zoo Ua Nws: Cov lus qhia no yog rau cov neeg taug kev thiab cov neeg caij tsheb kauj vab ib yam nkaus. Leej twg xav pom thaum tsaus ntuj thiab tseem saib zoo. Muab nws rau koj tus hluas nkauj, koj tus viv ncaus, koj tus nus, tus txiv tsev lossis txawm tias koj niam. Ib tus twg yog tus zoo nkauj thiab taug kev, khiav, lossis caij tsheb kauj vab thaum tsaus ntuj