Mundarija:
- 1 -qadam: uskunalar
- 2 -qadam: Arduino -ni sozlash
- 3 -qadam: Yakuniy dastur
- 4 -qadam: Video qo'llanma
- 5 -qadam: Xulosa
Video: Robot qo'lida o'ynaydigan pianino plitalari: 5 qadam
2024 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2024-01-30 13:27
Guruh UCNdan 2 ta avtomatika muhandisidan iborat bo'lib, ular bizni g'ayratli g'oyani ishlab chiqish va rivojlantirishga undaydi. Bu g'oya robot qo'lni boshqaradigan Arduino taxtasiga asoslangan. Arduino taxtasi - bu operatsiyaning miyasi, keyin esa operatsiyani bajaruvchi - Robotik qo'l, kerak bo'lgan narsani qiladi. Keyinchalik chuqurroq tushuntirish keladi.
1 -qadam: uskunalar
Robot qo'li:
Phantomx Pincher Robot Arm Kit Maek II (https://learn.trossenrobotics.com/38-interbotix-ro…)
Robot uchun dasturiy ta'minot- https://www.arduino.cc/en/Main/OldSoftwareRelease… Rangni aniqlash kamerasi:
CMUcam5 Pixy kamerasi - (https://charmedlabs.com/default/pixy-cmucam5/)
Dasturiy ta'minot - PixyMon (https://cmucam.org/projects/cmucam5/wiki/Install_PixyMon_on_Windows_Vista_7_8)
2 -qadam: Arduino -ni sozlash
Siz bu erda taxtada sozlashni ko'rishingiz mumkin, bu juda oson.
Chapda - quvvat manbai.
O'rta - birinchi servo uchun, u keyinchalik boshqa servolarga servo bilan ulanadi.
Pastki qismi - biz boshqaruv panelini kompyuter yoki noutbukdan boshqaramiz, uning ikkinchi uchida USB ulagichi bor.
3 -qadam: Yakuniy dastur
||| DASTUR |||
#qo'shing
#include #include "poses.h" #include // Pixy Library #include
#aniqlang POSECOUNT 5
BioloidController bioloid = BioloidController (1000000);
const int SERVOCOUNT = 5; int id; int pos; mantiqiy IDCheck; mantiqiy RunCheck;
void setup () {pinMode (0, OUTPUT); ax12SetRegister2 (1, 32, 50); // qo'shma raqami 1 registri 32 -ni 50 -tezlikka o'rnatish. ax12SetRegister2 (2, 32, 50); // qo'shma raqami 2 -registr 32 -ni 50 -tezlikka o'rnatish.; // qo'shma raqam 3 -registr 32 -ni 50 -tezlikka o'rnatish. ax12SetRegister2 (4, 32, 50); 32 tezlikka 100. // o'zgaruvchilarni ishga tushirish id = 1; pos = 0; IDCheck = 1; RunCheck = 0; // ochiq ketma -ket port Serial.begin (9600); kechikish (500); Serial.println ("############################"); Serial.println ("Serial aloqa o'rnatildi.");
// Lipo batareyasining kuchlanishini tekshiring CheckVoltage ();
// Servoslarni skanerlash, qaytarish pozitsiyasi MoveTest (); MoveHome (); MenuOptions (); RunCheck = 1; }
void loop () {// sensorni o'qing: int inByte = Serial.read ();
almashtirish (inBayt) {
holat '1': MovePose1 (); tanaffus;
"2" holati: MovePose2 (); tanaffus; "3" holati: MovePose3 (); tanaffus;
"4" holati: MovePose4 (); tanaffus;
"5" holati: MoveHome (); tanaffus; "6" holati: Grab (); tanaffus;
"7" holati: LEDTest (); tanaffus;
"8" holati: RelaxServos (); tanaffus; }}
void CheckVoltage () {// kuting, keyin kuchlanishni tekshiring (LiPO xavfsizligi) suzuvchi kuchlanish = (ax12GetRegister (1, AX_PRESENT_VOLTAGE, 1)) / 10.0; Serial.println ("############################"); Serial.print ("Tizim kuchlanishi:"); Ketma -ket chop etish (kuchlanish); Serial.println ("volts."); if (kuchlanish 10.0) {Serial.println ("Nominal kuchlanish darajalari."); } if (RunCheck == 1) {MenuOptions (); } Serial.println ("############################"); }
void MoveHome () {kechiktirish (100); // tavsiya etilgan pauza bioloid.loadPose (Uy); // pozani FLASH -dan, keyingiPose buferiga yuklang bioloid.readPose (); // joriy Servo pozitsiyalarida curPose buferiga o'qing Serial.println ("##########################"); Serial.println ("Servolarni uy holatiga o'tkazish"); Serial.println ("############################"); kechikish (1000); bioloid.interpolateSetup (1000); // joriy-> soniyadan 1/2 sekunddan ko'proq vaqtgacha (bioloid.interpolating> 0) interpolatsiyani o'rnatish {// biz yangi pozitsiyamiz bioloid.interpolateStep () ga etib bormagan holda buni bajaring; // agar kerak bo'lsa, servolarni siljiting. kechikish (3); } if (RunCheck == 1) {MenuOptions (); }}
void MovePose1 () {kechiktirish (100); // tavsiya etilgan pauza bioloid.loadPose (Pose1); // pozani FLASH -dan, keyingiPose buferiga yuklang bioloid.readPose (); // joriy Servo pozitsiyalarida curPose buferiga o'qing Serial.println ("##########################"); Serial.println ("Servolarni 1 -o'ringa ko'chirish"); Serial.println ("############################"); kechikish (1000); bioloid.interpolateSetup (1000); // joriy-> soniyadan 1/2 sekunddan ko'proq vaqtgacha interpolatsiya o'rnatish (bioloid.interpolating> 0) {// biz yangi pozitsiyamiz bioloid.interpolateStep () ga etib bormagan holda buni bajaring; // agar kerak bo'lsa, servolarni siljiting. kechikish (3); } SetPosition (3, 291); // 3 -chi bo'g'in o'rnini '0' kechiktirishga qo'ying (100); // bo'g'inning harakatlanishini kuting, agar (RunCheck == 1) {MenuOptions (); }}
void MovePose2 () {kechiktirish (100); // tavsiya etilgan pauza bioloid.loadPose (Pose2); // pozani FLASH -dan, keyingiPose buferiga yuklang bioloid.readPose (); // joriy Servo pozitsiyalarida curPose buferiga o'qing Serial.println ("##########################"); Serial.println ("Servolarni 2 -o'ringa ko'chirish"); Serial.println ("############################"); kechikish (1000); bioloid.interpolateSetup (1000); // joriy-> soniyadan 1/2 sekunddan ko'proq vaqtgacha (bioloid.interpolating> 0) interpolatsiyani o'rnatish {// biz yangi pozitsiyamiz bioloid.interpolateStep () ga etib bormagan holda buni bajaring; // agar kerak bo'lsa, servolarni siljiting. kechikish (3); } SetPosition (3, 291); // 3 -chi bo'g'in o'rnini '0' kechiktirishga qo'ying (100); // bo'g'inning harakatlanishini kuting, agar (RunCheck == 1) {MenuOptions (); }} bo'sh MovePose3 () {kechiktirish (100); // tavsiya etilgan pauza bioloid.loadPose (Pose3); // pozani FLASH -dan, keyingiPose buferiga yuklang bioloid.readPose (); // joriy Servo pozitsiyalarida curPose buferiga o'qing Serial.println ("##########################"); Serial.println ("Servolarni 3 -o'ringa ko'chirish"); Serial.println ("############################"); kechikish (1000); bioloid.interpolateSetup (1000); // joriy-> soniyadan 1/2 sekunddan ko'proq vaqtgacha (bioloid.interpolating> 0) interpolatsiyani o'rnatish {// biz yangi pozitsiyamiz bioloid.interpolateStep () ga etib bormagan holda buni bajaring; // agar kerak bo'lsa, servolarni siljiting. kechikish (3); } SetPosition (3, 291); // 3 -chi bo'g'in o'rnini '0' kechiktirishga qo'ying (100); // bo'g'inning harakatlanishini kuting, agar (RunCheck == 1) {MenuOptions (); }}
void MovePose4 () {kechiktirish (100); // tavsiya etilgan pauza bioloid.loadPose (Pose4); // pozani FLASH -dan, keyingiPose buferiga yuklang bioloid.readPose (); // joriy Servo pozitsiyalarida curPose buferiga o'qing Serial.println ("##########################"); Serial.println ("Servolarni 4 -o'ringa ko'chirish"); Serial.println ("############################"); kechikish (1000); bioloid.interpolateSetup (1000); // joriy-> soniyadan 1/2 sekunddan ko'proq vaqtgacha (bioloid.interpolating> 0) interpolatsiyani o'rnatish {// biz yangi pozitsiyamiz bioloid.interpolateStep () ga etib bormagan holda buni bajaring; // agar kerak bo'lsa, servolarni siljiting. kechikish (3); } SetPosition (3, 291); // 3 -chi bo'g'in o'rnini '0' kechiktirishga qo'ying (100); // bo'g'inning harakatlanishini kuting, agar (RunCheck == 1) {MenuOptions (); }}
void MoveTest () {Serial.println ("##########################"); Serial.println ("Harakat belgisi testini boshlash"); Serial.println ("############################"); kechikish (500); id = 1; pos = 512; while (id <= SERVOCOUNT) {Serial.print ("Servo identifikatorini ko'chirish:"); Serial.println (id);
while (pos> = 312) {SetPosition (id, pos); pos = pos--; kechikish (10); }
while (pos <= 512) {SetPosition (id, pos); pos = pos ++; kechikish (10); }
// keyingi servo identifikatoriga takrorlang id = id ++;
} if (RunCheck == 1) {MenuOptions (); }}
void MenuOptions () {Serial.println ("##########################"); Serial.println ("Shaxsiy testlarni qayta ishga tushirish uchun 1-5 variantni kiriting."); Serial.println ("1) 1 -o'rin"); Serial.println ("2) 2 -o'rin"); Serial.println ("3) 3 -o'rin"); Serial.println ("4) 4 -o'rin"); Serial.println ("5) Uy pozitsiyasi"); Serial.println ("6) Tizim kuchlanishini tekshirish"); Serial.println ("7) LED sinovini o'tkazish"); Serial.println ("8) Relax Servo"); Serial.println ("############################"); }
bo'sh RelaxServos () {id = 1; Serial.println ("############################"); Serial.println ("Rahatlatıcı xizmatlar."); Serial.println ("############################"); while (id <= SERVOCOUNT) {Rahatlang (id); id = (id ++)%SERVOCOUNT; kechikish (50); } if (RunCheck == 1) {MenuOptions (); }}
bo'sh LEDTest () {id = 1; Serial.println ("############################"); Serial.println ("LED sinovidan o'tish"); Serial.println ("############################"); while (id <= SERVOCOUNT) {ax12SetRegister (id, 25, 1); Serial.print ("LED ON - Servo ID:"); Serial.println (id); kechikish (3000); ax12SetRegister (id, 25, 0); Serial.print ("LED o'chirilgan - Servo identifikatori:"); Serial.println (id); kechikish (3000); id = id ++; } if (RunCheck == 1) {MenuOptions (); }}
void Grab () {SetPosition (5, 800); // 1 -chi bo'g'in o'rnini '0' kechiktirishga o'rnating (100); // bo'g'in harakatlanishini kuting
}
Biz o'z dasturimizni ishlab chiqaruvchi PincherTest dasturiga asoslanib, joylashishni aniqlashda bir qancha muhim o'zgartirishlarni kiritdik. Biz robotning xotiradagi pozitsiyalariga ega bo'lishi uchun pozes.h dan foydalanganmiz. Birinchidan, biz Pixycam -da avtomatik ravishda o'ynash qo'limizni yaratishga harakat qildik, lekin yorug'lik va kichik ekran muammolari tufayli bu amalga oshmadi. Robot uyning asosiy pozitsiyasiga ega, dasturni yuklagandan so'ng, u robotda topilgan barcha servolarni sinovdan o'tkazadi. Biz 1-4 tugmachalari uchun pozalarni o'rnatdik, shuning uchun eslab qolish oson bo'ladi. Dasturdan bemalol foydalaning.
4 -qadam: Video qo'llanma
5 -qadam: Xulosa
Xulosa qilib aytganda, robot - bu biz uchun qiziqarli kichik loyiha va o'ynash va tajriba o'tkazish. Men sizni sinab ko'rishni va uni sozlashni taklif qilaman.
Tavsiya:
Chladni plitalari: 5 qadam
Chladni Plitalar: Chladni plaat gemaaktdan keyin, yuqori tezlikda, zo'r zo'ravonlik bilan shug'ullanadi
Burilish effektori: bükme plitalari uchun robot -end effektori: 6 qadam
Burilish effektori: egiluvchi plastinkalar uchun robot -tugatish effektori: Maqsad: uchinchi darajali egiluvchi faol elementlarni birlamchi/ikkilamchi konstruktiv elementga/ramkaga shakllantirish va mahkamlash. Guruh a'zolari: Babasola Tomas, Niloofar Imani, Songxroh zavodi
Witblox yordamida golf o'ynaydigan robot: 7 qadam
Witblox yordamida golf o'ynaydigan robot: Hammaga salom. Bugun men golf o'ynaydigan robot qildim. Hammamizga ma'lumki, aylanma harakatni o'zaro harakatga aylantirish mumkin. Xuddi shu hodisadan foydalanib, men to'pni yo'lda doimiy ravishda tebranadigan loyihani yaratdim
Arduino - pianino plitalari: 16 qadam (rasmlar bilan)
Arduino - pianino plitalari: Salom, internet ahli, bu arduino uno r3.so da mobil o'yinni qanday qilib aniq qilib ajratish mumkinligi haqida gap ketganda, sizga quyidagi qismlar kerak bo'ladi. ! 1x Arduino Uno r3 ($ 42) 2x LCD klaviatura qalqoni (har biri 19 dollar) 5
O'zingizning balans taxtangizni yarating (va Wii Fit yo'lida bo'ling): 6 qadam
O'zingizning balans taxtangizni yarating (va Wii Fit yo'lida bo'ling): I-CubeX texnologiyasidan foydalanib, turli o'yinlar va jismoniy tayyorgarlik mashg'ulotlari uchun interfeys sifatida o'z balans taxtangizni yoki BalanceTile-ni yarating. O'zingizning ilovangizni yarating va Wii Fitdan nariga o'ting! Video umumiy nuqtai nazarni taqdim etadi va