Cov txheej txheem:

"Qhov cuam tshuam rau qhov chaw" Kev Ua Si Nrog Gyro Sensor thiab Nokia 5110 LCD: 3 Kauj Ruam
"Qhov cuam tshuam rau qhov chaw" Kev Ua Si Nrog Gyro Sensor thiab Nokia 5110 LCD: 3 Kauj Ruam

Video: "Qhov cuam tshuam rau qhov chaw" Kev Ua Si Nrog Gyro Sensor thiab Nokia 5110 LCD: 3 Kauj Ruam

Video:
Video: Kev Muag Khoom thiab Kev Sib Cuam Tshuam Nrog Cov Neeg Qhua Yam Muaj Kev Nyab Xeeb 2024, Hlis ntuj nqeg
Anonim
Image
Image

Tom qab kuv Tamagotchi tuag (txoj haujlwm kawg), Kuv pib tshawb nrhiav txoj hauv kev tshiab kom nkim kuv lub sijhawm. Kuv txiav txim siab los tsim qhov kev ua si classic "Qhov cuam tshuam rau thaj chaw" ntawm Arduino. Txhawm rau ua kom qhov kev ua si nthuav me ntsis thiab lom zem, Kuv siv lub ntsuas ntsuas lub ntsej muag Kuv tau dag ib puag ncig raws li kev tswj hwm ntawm lub dav hlau.

Kauj Ruam 1: Tsim Txoj Haujlwm ntawm Breadboard

Tsim Txoj Haujlwm ntawm Breadboard
Tsim Txoj Haujlwm ntawm Breadboard
Tsim Txoj Haujlwm ntawm Breadboard
Tsim Txoj Haujlwm ntawm Breadboard

Kho vajtse yog yooj yim heev. Koj xav tau:

khawm thiab 10 kOhm resistor

Arduino (Uno / Nano / tsis muaj teeb meem)

MPU-6050 Gyro Sensor

Nokia 5110 LCD zaub

Yeem tau: tus Buzzer nquag thiab 20 Ohm resistor

Txhawm rau ua kom yooj yim dua, Kuv tau siv daim npog rau Nokia LCD. Tsuas muaj lub LCD, hloov mus rau lub teeb pom kev zoo thiab qee tus pinheads rau 5 Volts, GND, thiab lwm yam.

Muaj ntau hom Nokia LCD muaj. Tej zaum koj yuav tsum tau kho qhov thaiv lossis hloov qhov program me ntsis.

Kauj ruam 2: Programming Game

Programming Game
Programming Game
Programming Game
Programming Game

Zoo li hauv kuv qhov haujlwm kawg kuv tsim txhua daim duab nrog pleev xim thiab siv LCDAssistant los hloov cov duab ua hex.

Koj tuaj yeem rub tawm cov ntawv thiab muab tso rau hauv koj Arduino. Yog tias koj qhov teeb tsa raug, txhua yam yuav tsum ua haujlwm zoo. Koj tuaj yeem hloov qhov sib piv ntawm koj lub LCD nrog myGLCD.setContrast (X);

Kuv ntxiv cov ntaub ntawv rar (gyro.rar) thiab ob daim ntawv cais (Graphic.c & gyro.ino). Koj tuaj yeem xaiv ntawm ib qho ntawm cov kev xaiv no.:)

Kauj Ruam 3: Ua Si Game thiab Muaj Kev Lom Zem:)

Ua Si Game thiab Muaj Kev Lom Zem:)
Ua Si Game thiab Muaj Kev Lom Zem:)
Ua Si Game thiab Muaj Kev Lom Zem:)
Ua Si Game thiab Muaj Kev Lom Zem:)

Kuv tau siv ob lub davhlau sib txawv ntawm lub dav hlau, nyob ntawm lub kaum sab xis uas lub ntsuas hluav taws xob tau tuav. Koj yuav tsum zam kev tsoo mus rau lwm yam khoom xws li lub hnub qub lossis tsuas yog rhuav tshem lawv nrog kev txhaj tshuaj laser. Qee qhov teeb meem muaj kev ruaj khov ntau dua li lwm tus yog li koj yuav tsum tua lawv ob zaug txhawm rau txhawm rau rhuav lawv. Cov yeeb ncuab dav hlau ya rov qab. Lub hom phiaj yog khaws ntau lub hnub qub raws li koj tuaj yeem ua tau. Tom qab koj lub dav hlau raug rhuav tshem koj tuaj yeem pom koj cov qhab nia thiab koj lub sijhawm muaj sia nyob.

Yog tias koj xav tau cov version nrog tus joystick raws li kev tswj hwm ntawm lub dav hlau sau kuv zaws hauv cov lus hauv qab no.:)

Pom zoo: