2025 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2025-01-13 06:58
Bu Kasper Borger Tulinius tomonidan SmartStorage loyihasi
1 -qadam: usullar
Ushbu loyiha uchun men turli xil dasturlardan foydalandim.
Mashinaning o'zi DaVinci jr 123D Design and Printete -da yaratilgan. printer
Eng yaxshi emas, lekin juda sodda va foydalanuvchilar uchun qulay.
U C da dasturlashtirilgan Arduino tomonidan boshqariladi.
Men WindowsFormApp (C#) yaratish uchun Visual Studio 2017 -dan foydalanganman.
2 -qadam: Arduino uchun kod
Mashinaning o'zi uchun men Arduino Mega -dan foydalandim. Bu C da dasturlashtirilgan. Mashina juda oddiy. Rafni olish va operatorga taqdim etish uchun oddiy ketma -ketlik ishlaydi.
Men foydalangan dvigatellar 2 ta kichik SBT0811 dvigateli.
Mashinani boshqarish uchun men port orqali aloqa qiladigan ilovani yaratdim.
#"Stepper.h" ni qo'shing
#DEFINE 32 -QADAMLAR // Ichki milni aylantirish uchun qadamlar soni // Tashqi milning bir aylanishiga 2048 qadam int cmd; // WinApp int posZero = 0; int posOne = 1000; int posTwo = 1500; int posThree = 2000; int grab = 100; int etkazib berish = -100; int steps_extractor_out = 512; int steps_extractor_back = -512; Bosqichli yuk ko'targich (QADAMLAR, 8, 10, 9, 11); Bosqichli ekstraktor (STEPS, 2, 3, 4, 5); void setup () {} void loop () {Serial.begin (9600); cmd = Serial.read (); agar (cmd == 1) {Serial.end (); kechikish (1000); } if if (cmd == 0) {hoist.setSpeed (600); ko'taruvchi.qadam (posOne); kechikish (200); extractor.setSpeed (300); extractor.step (steps_extractor_out); kechikish (200); ko'taruvchi.setSpeed (100); ko'tarish (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'tarish.qadam (-posOne-grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (5000); // EVT CMD FRA WINaPP extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi qadam (posOne+grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (200); yuk ko'tarish.setSpeed (100); ko'taruvchi (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'taruvchi.qadam (-posOne); Serial.begin (9600); Serial.println (0); Serial.end (); } if if (cmd == 2) {hoist.setSpeed (600); ko'taruvchi qadam (posTwo); kechikish (200); extractor.setSpeed (300); extractor.step (steps_extractor_out); kechikish (200); yuk ko'tarish.setSpeed (100); ko'tarish (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'tarish.qadam (-posTwo-grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (5000); // EVT CMD FRA WINaPP extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi qadam (posTwo+grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (200); yuk ko'tarish.setSpeed (100); ko'taruvchi (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'taruvchi.qadam (-posTwo); Serial.begin (9600); Serial.println (0); Serial.end (); } if if (cmd == 3) {hoist.setSpeed (600); ko'taruvchi.qadam (posThree); kechikish (200); extractor.setSpeed (300); extractor.step (steps_extractor_out); kechikish (200); yuk ko'tarish.setSpeed (100); ko'tarish (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'tarish.qadam (-posThree-grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (5000); // EVT CMD FRA WINaPP extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi qadam (posThree+grab); kechikish (200); extractor.step (steps_extractor_out); kechikish (200); ko'taruvchi.setSpeed (100); ko'taruvchi (qadam); kechikish (200); extractor.step (steps_extractor_back); kechikish (200); ko'taruvchi.setSpeed (600); ko'taruvchi.qadam (-posThree); Serial.begin (9600); Serial.println (0); Serial.end (); }}
3 -qadam: dastur
Men yaratgan ilova VisualStudio 2017 da yaratilgan.
Bu deraza shakllari ilovasi bo'lib, u holda SQL ma'lumotlar bazasini o'z ichiga oladi.
Ma'lumotlar bazasida foydalanuvchi, har bir mashinaning joylashuvi va har bir mashinaning tarkibi to'g'risidagi ma'lumotlarni o'z ichiga olgan 3 ta jadval mavjud.
Ilovani ishga tushirganda siz ismingiz va pw bilan kirasiz.
Keyin siz qaysi mashinani ishlatishni tanlaysiz va har bir tortmasining tarkibi siz uchun taqdim etiladi.
Keyin siz "tortmachani olish" tugmachasini bosishingiz mumkin va mashina tortmani oladi va siz olgan yoki topshirgan narsaning miqdorini yangilashingiz mumkin.