Orodha ya maudhui:
- Hatua ya 1: Vifaa
- Hatua ya 2: Kukusanya Sehemu
- Hatua ya 3: Kuandika Nano
- Hatua ya 4: Kuweka Sehemu kwenye Mio
Video: Bluetooth Robot Mio: Hatua 4
2024 Mwandishi: John Day | [email protected]. Mwisho uliobadilishwa: 2024-01-30 12:48
Hatua ya 1: Vifaa
1- Mio ya Robot
2- L298N Mdhibiti wa Voltage Dual Motor Dereva Board
3- Arduino Nano
4- HC06 Bodi ya Moduli ya Bluetooth-Serial
5- (2x) 9 V Kichwa cha Betri
Hatua ya 2: Kukusanya Sehemu
Wacha tuanze na unganisho la dereva wa gari kwanza Wacha tuunganishe nyaya za kuruka chini ya in1, in2, in3, in4 pini za dereva wa gari. (kama pic1) Basi wacha tuunganishe kebo kwa 1 kwa pini ya dano ya nano, in2 hadi d10 pini, in3 hadi d5 pini, na mwishowe kebo ndani ya pini ya in4 hadi d9. (kama ilivyo kwenye picha 2) Sasa, wacha tufanye unganisho la moduli yetu ya HC06, wacha tuunganishe pini ya RXD kwa pini ya TXD ya nano, pini ya TXD kwa pini ya RXD, VCC na pini za GND kwa pini yoyote ya 5v na GND ya nano. (kama pic3) Na mwishowe, wacha tufanye unganisho la gari. Mio inapotukabili, wacha tuunganishe nyaya za kulia za gari kwenye pini 3, 4 za dereva wa gari na nyaya za kushoto kwa pini za 1, 2. Wacha tuunganishe kebo nyekundu ya kofia ya betri ya 9v kwenye pini ya VIN ya nano na kebo nyeusi kwenye pini ya GND. (kama pic4) Na wacha tukate waya ya kuruka katikati, vua mwisho na uiunganishe na pini ya GND ya nano, kwa pini ya GND ya dereva wa gari. (kama pic5, 6) Wacha tuunganishe kebo nyekundu ya kichwa kingine cha betri 9v kwenye pini ya 12v na kebo nyeusi kwenye pini ya gnd kwenye pini za umeme za dereva. (kama kwenye picha7)
Hatua ya 3: Kuandika Nano
const int motorA1 = 5; // L298N'in IN3 Girişi
motor int motorA2 = 6; // L298N'in IN1 Girişi const int motorB1 = 10; // L298N'in IN2 Girişi const int motorB2 = 9; // L298N'in IN4 Girişi
int i = 0; // Döngüler için atanan rastgele bir değişken int j = 0; // Döngüler için atanan rastgele bir değişken int state; // Bluetooth cihazından gelecek sinyalin değişkeni int vSpeed = 255; // Standart Hız, 0-255 arası bir değer alabilir
kuanzisha batili () {// Pinlerimizi belirleyelim pinMode (motorA1, OUTPUT); pinMode (motorA2, OUTPUT); pinMode (motorB1, OUTPUT); pinMode (motorB2, OUTPUT); // 9600 baud hızında bir seri port açalım Serial.begin (9600); } kitanzi batili () {// Bluetooth bağlantısı koptuğunda veya kesildiğinde arabayı durdur. // (Aktif etmek için alt satırın "//" larını kaldırın.) // if (digitalRead (BTState) == LOW) {state = 'S'; }
// Gelen veriyi 'state' değişkenine kaydet if (Serial.available ()> 0) {state = Serial.read (); } // Uygulamadan ayarlanabilen 4 hız seviyesi. (Değerler 0-255 arasında olmalı) ikiwa (state == '0') {vSpeed = 0;} mwingine ikiwa (state == '1') {vSpeed = 100;} mwingine ikiwa (state == '2') {vSpeed = 180;} mwingine ikiwa (state == '3') {vSpeed = 200;} mwingine ikiwa (state == '4') {vSpeed = 255;} / *** ******************** İleri **************************** / // Gelen veri 'F' ise araba ileri gider. ikiwa (state == 'F') {analogWrite (motorA1, vSpeed); AnalogWrite (motorA2, 0); AnalogWrite (motorB1, vSpeed); AnalogWrite (motorB2, 0); } / ********************** İleri Sol ************************ / // Gelen veri 'G' ise araba ileri sol (çapraz) mpokeaji. vinginevyo ikiwa (state == 'G') {analogWrite (motorA1, vSpeed); AnalogWrite (motorA2, 0); AnalogWrite (motorB1, 100); AnalogWrite (motorB2, 0); } / ********************** İleri Sağ ************************ / // Gelen veri 'I' ise araba ileri sağ (çapraz) mpokeaji. vinginevyo ikiwa (state == 'I') {analogWrite (motorA1, 100); AnalogWrite (motorA2, 0); AnalogWrite (motorB1, vSpeed); AnalogWrite (motorB2, 0); } / *********************** Geri ************************ **** / // Gelen veri 'B' ise araba geri gider. vinginevyo ikiwa (state == 'B') {analogWrite (motorA1, 0); AnalogWrite (motorA2, vSpeed); AnalogWrite (motorB1, 0); AnalogWrite (motorB2, vSpeed); } / ********************** Geri Sol ************************ / // Gelen veri 'H' ise araba geri sol (çapraz) mpokeaji mwingine ikiwa (state == 'H') {} / ********************* * Geri Sağ ************************ / // Gelen veri 'J' ise araba geri sağ (çapraz) mpokeaji mwingine ikiwa (state == ' J ') {analogWrite (motorA1, 0); AnalogWrite (motorA2, vSpeed); AnalogWrite (motorB1, 0); AnalogWrite (motorB2, 100); } / *************************** Sol Sol ******************** ********* / // Gelen veri 'L' ise araba sola gider. vinginevyo ikiwa (state == 'L') {analogWrite (motorA1, vSpeed); AnalogWrite (motorA2, 150); AnalogWrite (motorB1, 0); AnalogWrite (motorB2, 0); } / *************************** Sağ ******************** ********* / // Gelen veri 'R' ise araba sağa mpasua mwingine ikiwa (state == 'R') {analogWrite (motorA1, 0); AnalogWrite (motorA2, 0); AnalogWrite (motorB1, vSpeed); AnalogWrite (motorB2, 150); } / ************************ Acha *********************** ****** / // Gelen veri 'S' ise arabayı durdur. vinginevyo ikiwa (state == 'S') {analogWrite (motorA1, 0); AnalogWrite (motorA2, 0); AnalogWrite (motorB1, 0); AnalogWrite (motorB2, 0); }} AnalogWrite (motorA1, 0); AnalogWrite (motorA2, 100); AnalogWrite (motorB1, 0); AnalogWrite (motorB2, vSpeed);
Hatua ya 4: Kuweka Sehemu kwenye Mio
Sasa tuko katika hatua ya mwisho ya kuunganisha mio ya roboti
Ilipendekeza:
Jinsi ya Kujenga SMARS Robot - Arduino Smart Robot Tank Bluetooth: Hatua 16 (na Picha)
Jinsi ya Kujenga SMARS Robot - Arduino Smart Robot Tank Bluetooth: Nakala hii inafadhiliwa na PCBWAY.PCBWAY hufanya PCB za hali ya juu kwa watu kote ulimwenguni. Jaribu mwenyewe na upate PCB 10 kwa $ 5 tu kwa PCBWAY na ubora mzuri sana, Shukrani PCBWAY. Ngao ya Magari kwa Arduino Uno
Ufuatiliaji wa Acoustic Na Arduino Uno Hatua kwa Hatua (hatua 8): Hatua 8
Ufuatiliaji wa Acoustic Na Arduino Uno Hatua kwa hatua (hatua-8): transducers za sauti za ultrasonic L298N Dc umeme wa umeme wa adapta na pini ya kiume ya dc Arduino UNOBreadboard Jinsi hii inavyofanya kazi: Kwanza, unapakia nambari kwa Arduino Uno (ni mdhibiti mdogo aliye na dijiti na bandari za analog kubadilisha msimbo (C ++)
RC Iliyofuatiliwa Robot Kutumia Arduino - Hatua kwa Hatua: 3 Hatua
RC Iliyofuatiliwa Robot Kutumia Arduino - Hatua kwa Hatua: Haya jamani, nimerudi na chasisi nyingine nzuri ya Robot kutoka BangGood. Natumahi kuwa umepitia miradi yetu ya awali - Spinel Crux V1 - Robot Iliyodhibitiwa na Ishara, Spinel Crux L2 - Arduino Pick na Weka Robot na Silaha za Roboti na Badland Braw
Utunzaji wa Robot ya Kushughulikia Nyenzo za Bluetooth na Bluetooth: Hatua 7
Utunzaji wa Robot ya GSM na Bluetooth: “ GSM (SMS) na Bluetooth Robot isiyo na waya &Rdquo; ni roboti ambayo ina uwezo wa kupokea seti ya amri / maagizo kwa njia ya huduma ya ujumbe mfupi na hufanya vitendo muhimu. Tutatumia modem / kujitolea
MIO Moov 200 Spika Mod: 3 Hatua
MIO Moov 200 Spika Mod: Spika yangu ya asili ilisikika kama imegawanyika, na ilikuwa ikiteta. Iliyotumwa kwa ukarabati wa udhamini, na wiki 5 baadaye niliirudisha. 2 mos baada ya hapo, kitu kimoja. Nilikuwa nimeamua sio thamani ya kungojea, ili wabadilishe na POS nyingine, kwa