Cov txheej txheem:

BricKuber Project - Raspberry Pi Rubiks Cube Solving Robot: 5 Cov Kauj Ruam (nrog Duab)
BricKuber Project - Raspberry Pi Rubiks Cube Solving Robot: 5 Cov Kauj Ruam (nrog Duab)

Video: BricKuber Project - Raspberry Pi Rubiks Cube Solving Robot: 5 Cov Kauj Ruam (nrog Duab)

Video: BricKuber Project - Raspberry Pi Rubiks Cube Solving Robot: 5 Cov Kauj Ruam (nrog Duab)
Video: How To Build a Raspberry Pi Rubiks Cube Solving Robot 2024, Kaum ib hlis
Anonim
Image
Image

BricKuber tuaj yeem daws Rubik lub voos xwmfab hauv li tsawg dua 2 feeb.

BricKuber yog qhov qhib Rubik lub voos xwmfab daws neeg hlau koj tuaj yeem tsim koj tus kheej

Peb xav tsim Rubiks lub voos xwmfab daws neeg hlau nrog Raspberry Pi. Ntau dua li mus nrawm, peb tau mus nrog qhov yooj yim: yog tias koj muaj Raspberry Pi, BrickPi cov khoom siv, thiab tus qauv LEGO Mindstorms EV3 lossis NXT Cov Khoom, koj yuav tsum muaj peev xwm ua tau yooj yim ua raws peb cov kauj ruam. Lub software tau sau ua lus Python programming. Koj tuaj yeem pom txhua qhov chaws-code ntawm Github ntawm no.

Tom qab Rubik lub voos xwmfab tsis ntev los no tau pib rov qab los. Tsim nyob rau xyoo 1974, nws yog lub ntiaj teb cov khoom ua si muag zoo tshaj plaws. Tab sis kev daws lawv yuav siv kev xav, kev rau siab, thiab txuj ci… yog li vim li cas ho tsis cia tus neeg hlau ua nws? Hauv txoj haujlwm no, peb coj Raspberry Pi, BrickPi, thiab teeb tsa LEGO Mindstorms thiab tsim Rubik lub voos xwmfab daws neeg hlau. Cias tso tus Rubik lub voos xwm txheej tsis tau daws teeb meem hauv qhov kev daws teeb meem, khiav cov haujlwm nab hab sej, thiab koj Rubik lub voos xwmfab daws tau! Txoj haujlwm siv Pi los daws qhov Rubik lub voos xwmfab ncaj qha. BrickPi3 siv lub Rubik lub voos xwm txheej uas tsis tau daws thiab Raspberry Pi siv daim duab ntawm txhua sab ntawm Rubik lub voos xwmfab nrog Raspberry Pi Lub Koob Yees Duab. Tus Pi tsim cov ntawv qhia chaw ntawm cov xwm txheej xim uas qhia tias lawv nyob qhov twg ntawm lub voos xwmfab. Thaum nws tau ua tiav lub voos xwmfab, Pi siv "kociemba" lub tsev qiv ntawv nab nab los ua daim duab qhia kev txav chaw xav tau los daws qhov Rubik lub voos xwmfab. Cov ntaub ntawv no yog coj los ntawm Pi thiab BrickPi3 txhawm rau daws Rubik lub voos xwmfab siv LEGO lub cev muaj zog. Qhov tshwm sim: daws Rubik lub voos xwmfab.

Kauj Ruam 1: Cov Cuab Yeej thiab Cov Khoom

Tsim Nws
Tsim Nws
  • BrickPi3 - Peb yuav siv BrickPi los tswj cov LEGO lub cev muaj zog uas daws Rubik lub voos xwmfab daws.
  • Raspberry Pi - Tus Pi yuav ua tiav, thaij duab, thiab hais kom BrickPi.
  • Raspberry Pi Lub Koob Yees Duab - Pi Lub Koob Yees Duab yuav thaij duab ntawm Rubiks lub voos xwm txheej uas tsis tau daws.
  • Ethernet Cable - Koj yuav xav tau koj lub tshuab txuas nrog internet. Yog tias koj xav ua qhov no dhau wifi, qhov ntawd zoo ib yam!
  • Raspbian rau Neeg Hlau SD Card - Cov software uas khiav Raspberry Pi. Qhov no los nrog feem ntau ntawm cov software xav tau rau qhov kev qhia no. Koj tseem tuaj yeem rub tawm software dawb.
  • LEGO Mindstorms EV3 Cov Khoom (31313) - Koj yuav xav tau pawg LEGO thiab ob lub cav loj, thiab ib lub cav servo, thiab Ultrasonic Sensor.
  • Rubik's Cube - Peb pom ib qho uas tig tau zoo nkauj dawb ntawm no. Koj tuaj yeem siv tsuas yog hais txog ib qho 9x9x9 Rubik lub voos xwmfab txawm hais tias.

Kauj ruam 2: Tsim Nws

Tsim Nws
Tsim Nws
Tsim Nws
Tsim Nws

Tsim lub Solver

Qhov kev tsim no tau tshoov siab los ntawm MindCub3r tsim rau LEGO EV3. Txhawm rau tsim BricKuber, pib los ntawm kev tsim MindCub3r. Cov lus qhia hauv tsev LEGO tuaj yeem nrhiav tau ntawm no.

Rubiks lub voos xwmfab tsim tsim muaj peb ntu loj txav. Thawj yog tus menyuam txaj los tuav lub Rubik lub voos xwmfab. Qhov thib ob yog tus shuffler, caj npab uas siv los tig Rubik lub voos xwmfab.

Thaum kawg, peb ntxiv lub koob yees duab caj npab. Hauv qhov kev tsim qauv qub los ntawm MindCubr, qhov no tuav EV3 xim xim hla Rubik lub voos xwmfab. Hauv peb qhov kev hloov kho, nws tuav lub Raspberry Pi Lub Koob Yees Duab hla Rubik lub voos xwmfab. Peb siv ob LEGO Mindstorms lub cev muaj zog los tswj lub voos xwmfab: thawj zaum hauv qab tus menyuam txaj kom tig lub voos xwmfab, thiab qhov thib ob txav lub shuffler caj npab kom tig lub voos xwmfab ntawm txoj kab sib txawv.

Sib sau ua ke BrickPi3

Koj tuaj yeem pom cov lus qhia los ua ke rau BrickPi3 ntawm no. Peb yuav tsum tau sib sau rooj plaub, muab BrickPi3, Raspberry Pi, Raspberry Pi Lub Koob Yees Duab, ntxiv SD Card, thiab ntxiv roj teeb. Txhawm rau ua kom yooj yim rau teeb tsa software, Raspbian rau Robots los nrog feem ntau ntawm cov software koj yuav xav tau teeb tsa. Koj yuav xav tau yam tsawg kawg yog 8 GB SD Card, thiab koj yuav xav nthuav daim disk kom haum rau qhov loj ntawm SD Card.

Txuas BrickPi3

Peb ntxiv BrickPi3 rau LEGO los ua ke. Peb siv LEGO EV3 "tis" los txhawb nqa BrickPi3 thiab ua kom nws qib nrog BricKuber lub cev. Nov yog cov kauj ruam zoo los ntxiv 8XAA roj teeb rau lub hwj chim pob thiab txuas BrickPi3 lub hwj huam pob rau LEGO los ua ke. Txog rau kev ua haujlwm koj tuaj yeem ua lub zog BrickPi3 ntawm USB lub zog rau Raspberry Pi, txawm li cas los xij kom txav lub cav koj yuav xav tau muab lub zog nrog Lub Pob Pob.

Txuas Cov Tsav Tsheb mus rau BrickPi3

Txuas lub Shuffler Tsav mus rau lub cav chaw nres nkoj "MD". Txuas lub cav me me rau ntawm "MA" chaw nres nkoj ntawm BrickPi3. Txuas lub Koob Yees Duab lub cev mus rau "MC" chaw nres nkoj (qhov no yog lub cav me me zoo li lub cav). Txawm hais tias peb yuav tsis txav lub koob yees duab, tej zaum koj yuav xav kho qhov chaw ntawm lub koob yees duab siv lub tshuab.

Txuas lub Koob Yees Duab Raspberry Pi

Siv LEGO Lub Koob Yees Duab txhawb nqa, txuas lub koob yees duab. Lub lens me me dub ntawm lub koob yees duab yuav tsum haum ntawm ob LEGO nqaj txhawb. Ruaj lub koob yees duab kom ruaj ntseg rau LEGO txhawb nqa nrog qee daim kab xev hluav taws xob. Nov yog lub sijhawm zoo kom paub tseeb tias lub koob yees duab yog txoj haujlwm kom tuaj yeem ntes tag nrho Rubik lub voos xwmfab. Koj tuaj yeem nqa daim duab sim nrog raspistill hais kom ua

raspistill -o cam.jpg

Txheeb xyuas tias lub voos xwmfab zoo nyob hauv nruab nrab ntawm daim duab.

Kauj ruam 3: Npaj Software

Koj tuaj yeem siv txhua qhov version ntawm Raspbian lossis Raspbian rau Robots, peb cov duab kev cai uas los nrog BrickPi3 twb tau teeb tsa. Yog tias koj siv tus qauv txheej txheem ntawm Raspbian, koj tuaj yeem nruab BrickPi3 cov tsev qiv ntawv siv cov lus txib

sudo curl -kL dexterindustries.com/update_brickpi3 | tsoo

Cov kauj ruam no yuav teeb tsa txhua lub tsev qiv ntawv xav tau los ua haujlwm BrickPi3 ntawm koj li duab Raspbian. Hla cov kauj ruam no yog tias koj siv Raspbian rau Neeg Hlau: BrickPi3 twb tau teeb tsa lawm.

Thaum kawg, teeb tsa txhua qhov kev vam khom ntawm qhov project siv cov lus txib:

sudo curl https://raw.githubusercontent.com/DexterInd/Brick… | tsoo

Txog qib no koj BrickPi3 yuav tsum tau txuas nrog internet. Muaj ntau lub tsev qiv ntawv uas qhov haujlwm nyob ntawm, suav nrog qee qhov tseem ceeb los ntawm Daniel Walton (@dwalton76) ntawm Github, uas tau siv los daws qhov Rubik lub voos xwmfab.

Kauj Ruam 4: Daws Rubik's Cube

Daws Rubik's Cube
Daws Rubik's Cube
Daws Rubik's Cube
Daws Rubik's Cube
Daws Rubik's Cube
Daws Rubik's Cube

Muab ib qho Rubik lub voos xwmfab uas tsis tau muab tso rau hauv tus menyuam txaj. Khiav qhov hais kom ua

sudo python ~/Dexter/BrickPi3/Projects/BricKuber/BricKuber.py

Tus neeg hlau yuav tig lub voos xwmfab rau txhua lub ntsej muag thiab lub koob yees duab yuav siv 6 daim duab, ib qho ntawm txhua sab ntawm Cube. Raspberry Pi yuav txiav txim siab lub voos xwmfab teeb tsa los ntawm rau daim duab. Kev teeb tsa lub voos xwmfab yuav dhau mus rau kociemba Python lub tsev qiv ntawv txhawm rau nrhiav kev daws teeb meem zoo. Thaum kawg, tus neeg hlau yuav ua tus txav los daws qhov Rubik lub voos xwmfab!

Kauj Ruam 5: Tus Txheej Txheem Cai

Txhua qhov chaws rau BricKuber tuaj yeem pom nyob hauv peb qhov qhib github repo ntawm no.

Txoj haujlwm no siv cov software software hauv qab no teeb tsa los ntawm cov lus txib

Pom zoo: