Cov txheej txheem:

Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino: 5 Kauj Ruam
Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino: 5 Kauj Ruam

Video: Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino: 5 Kauj Ruam

Video: Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino: 5 Kauj Ruam
Video: Фитнес-трекер Jawbone UP 2024, Kaum ib hlis
Anonim
Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino
Pedometer Ntu 1: 128x32 Monochrome Screen thiab Arduino

Nov yog cov lus qhia qhia ib qho yuav siv lub vijtsam OLED nrog lawv Arduino li cas. Kuv tab tom siv lub vijtsam 128x32 tab sis koj tseem tuaj yeem siv qhov kev daws teeb meem sib txawv oled screen thiab hloov qhov kev daws teeb meem/kev tswj hwm raws li xav tau.

Hauv ntu no kuv yuav qhia koj yuav ua li cas tso saib pixel, lo lus, thiab tus lej. Hauv ntu tom ntej kuv yuav qhia koj yuav siv ADXL335 li cas. Tom qab ntawd kuv yuav txav los ntawm thiab Arduino UNO mus rau Pro Micro tsuas yog rau kev nqa tau thiab tseem mus dhau yuav ua li cas thiaj li them tus nqi pheej yig rau nws.

Kauj Ruam 1: Cov Khoom Yuav Tsum Tau

Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau

1) Arduino (Kuv tab tom siv UNO)

2) 128x32 oled screen

3) 4x Txiv neej rau Poj Niam Jumper Cables (Koj tseem tuaj yeem siv Txiv neej rau Txiv neej jumper cables thiab lub ncuav ci)

Kauj ruam 2: Kev sib txuas

Zaub => Arduino

VCC => 5v

GND => GND

SCL => A5

SDA => A4

Kauj ruam 3: Tsev qiv ntawv

Tsev qiv ntawv
Tsev qiv ntawv
Tsev qiv ntawv
Tsev qiv ntawv

1) Adafruit GFX

2) Adafruit SSD1306

Kauj ruam 4: Code

Kuv cov zaub yog monochrome yog li nws tsuas yog qhia hauv xiav. Hauv cov cai kuv siv WHITE vim tias yog tus lej tam sim no.

Hauv #define OLED_ADDR 0x3C koj yuav tsum muab qhov I2C chaw nyob hloov ua 0x3c ntawm koj cov zaub. Koj tuaj yeem pom nws los ntawm kev siv I2C scanner code uas tuaj yeem pom yooj yim.

Kauj ruam 5: Demo thiab Xaus

Kuv vam tias koj nyiam qhov qhia thiab ua tsaug.

Pom zoo: