Cov txheej txheem:

Localino Tracks Roomba IRobot, Maps Ib puag ncig thiab Tso Cai Tswj: 4 Kauj Ruam
Localino Tracks Roomba IRobot, Maps Ib puag ncig thiab Tso Cai Tswj: 4 Kauj Ruam

Video: Localino Tracks Roomba IRobot, Maps Ib puag ncig thiab Tso Cai Tswj: 4 Kauj Ruam

Video: Localino Tracks Roomba IRobot, Maps Ib puag ncig thiab Tso Cai Tswj: 4 Kauj Ruam
Video: How to set up iRobot Roomba vacuums & mops to map different floors 2024, Kaum ib hlis
Anonim
Image
Image

Txhawm rau txhim kho WiFi-UART choj, koj tuaj yeem tshawb xyuas qhov no github repo:

Nws muaj lub hauv paus zoo los pib nrog. Nco ntsoov koj nyeem cov lus qhia kom zoo, vim tias Roomba VCC thaum them nqi nce mus txog 20 Volts! Yog tias koj ntxiv ESP8266 yam tsis muaj qhov hloov pauv tau zoo uas ua haujlwm txawm tias txog 20V thiab hloov pauv mus rau 3.3V, koj yuav ua rau koj ESP puas tsuaj.

Kuj tseem nco ntsoov siv qib hloov pauv (piv txwv li siv qhov faib hluav taws xob) kom hloov 5V UART cov laj thawj ntawm Roomba mus rau 3.3V, uas yog siv los ntawm ESP.

Lwm qhov nthuav dav tseem ceeb yog, qhov hloov pauv phaus yuav tsum muaj 300mA, tab sis noch ntau dua lossis ntau dua (nyob ntawm tus phaw hloov nws tus kheej). Muaj qee qhov tawm uas tuaj yeem ua tam sim no ntau dua, tab sis ua rau Roomba tsoo vim tias lawv kos ntau dhau tam sim no thaum pib. Peb pom tias Pololu 3.3V, 300mA Step-Down Voltage Regulator (D24V3F3) ua haujlwm zoo xwb. Lwm txoj kev hloov pauv uas muaj 500mA / 600mA ua rau Roomba UART interface sib tsoo. Yeej yog Roomba tau hnov mob ntawm khawm nias, tab sis tsis yog ntawm cov lus txib ntawm UART interface. Thaum qhov no tshwm sim peb yuav tsum tshem lub roj teeb Roomba thiab txias rov pib dua Roomba nrog WiFi-UART tus choj txuas. Txawm li cas los xij, tsuas yog D24V3F3 ua haujlwm tau zoo.

Ib cag los ntawm cov ncauj lus ntxaws ntxaws, koj yuav tsum ntxiv cov lus txib ntxiv rau cov cai, uas koj tuaj yeem pom hauv Roomba qhib kev sib tham tshwj xeeb. Koj yuav tsum tau ntxiv txhua cov lus txib uas koj xav kom koj chav nyob ua rau muaj kev cuam tshuam (piv txwv li, rov qab, mus tom ntej, nrawm, thiab lwm yam).

piv txwv hauv arduino IDE:

tsis muaj dab tsi goForward () {char c = {137, 0x00, 0xc8, 0x80, 0x00}; // 0x00c8 == 200 Serial.print (c); }

void goBackward () {char c = {137, 0xff, 0x38, 0x80, 0x00}; // 0xff38 == -200 Serial.print (c); }

void spinLeft () {char c = {137, 0x00, 0xc8, 0x00, 0x01}; Serial.print (c); }

void spinRight () {char c = {137, 0x00, 0xc8, 0xff, 0xff}; Serial.print (c); }

yog tias koj sau hauv lua nws zoo li txawv me ntsis, piv txwv rau LEFT tig yuav zoo li no:

yog (_GET.pin == "LEFT") ces luam tawm ('\ 137'); --VEV

tmr.delay (100);

print ('\ 00'); cov. -Tshaj tawm = 200 = 0x00C8 -> 0 thiab 200

tmr.delay (100);

print ('\ 200'); cov. - Tshaj tawm

tmr.delay (100);

print ('\ 254'); cov. - Radius = 500 = 0x01F4 = 0x01 0xF4 = 1 244

tmr.delay (100);

print ('\ 12'); cov. - Tig

kawg

Nco ntsoov tias koj yuav tsum kho qhov kev piav qhia qhib rau koj Roomba. Muaj tsawg kawg yog ob qhov kev qhia tshwj xeeb qhib muaj.

rau Roomba 5xx series:

rau Roomba 6xx series:

Thaum koj tau tsim koj tus WiFi-UART choj thiab sim cov lus txib koj ua cov kauj ruam loj ntxiv. Daim vis dis aus no qhia tau tias daim ntawv thov thiab txoj hauv kev ua haujlwm. Peb tau me ntsis tub nkeeg, lub webinterface ploj tag nrho lwm cov lus txib tswj, xws li mus rau tom ntej, rov qab, nrawm, sab xis, sab laug thiab lwm yam, tab sis koj tuaj yeem muab cov lus txib ntawm http. Txawm li cas los xij, nws tsuas yog ua qauv qhia tias kev tswj chaw taws teeb ntawm Roomba ua haujlwm nrog ib qho yooj yim ntawm kho vajtse thiab software siv ESP8266.

Tam sim no zoo li koj tuaj yeem tswj hwm koj lub Roomba nyob deb ntawm lub PC daim ntawv thov, tsuas yog qhov uas ploj lawm yog qhov chaw nyob hauv tsev. Peb xav tau qhov no los kaw cov lus tawm tswv yim, vim tias peb lub hom phiaj yog txhawm rau tsav tus neeg hlau mus rau qee qhov kev taw qhia. Cia peb ua qhov no.

Kauj Ruam 3: Teeb Koj Qhov Chaw Nyob Hauv Tsev

Txhawm rau kaw cov lus tawm tswv yim peb siv kev siv sab hauv ib puag ncig. Peb siv Localino rau qhov no. Localino system muaj tawm ntawm "thauj tog rau nkoj" thiab "cim npe". Cov thauj tog rau nkoj tau muab tso rau ntawm qhov chaw ruaj khov sab hauv ntawm chav thiab nrhiav txoj haujlwm ntawm daim npav txav (uas tau muab tso rau ntawm Roomba). Kev ua qhov chaw yog ua tiav hauv daim ntawv thov PC. Qhov ntawd yog qhov txiaj ntsig zoo, vim tias koj tseem tuaj yeem tswj tau Roomba los ntawm tib lub PC! Muaj qhov pub dawb pub dawb muaj los ntawm Localino lub vev xaib, nws tau sau ua nab hab sej thiab tseem muaj cov dej ntws raws sijhawm uas muaj XYZ tswj hwm ntawm daim ntawv. Cov ntaub ntawv muaj nyob ntawm UDP network, tab sis koj tseem tuaj yeem ntxiv MQTT lossis lwm yam khoom zoo nkauj uas koj nyiam. Yog tias koj paub Python, muaj ntau lub tsev qiv ntawv uas pab koj.

Hauv daim vis dis aus no, kev ua kom pom ntawm Roomba tau pom. Yog li peb muaj 4 lub tog raj kheej teeb tsa hauv chav nyob ntawm qhov chaw ruaj khov, uas tso cai tso 3D ntawm Roomba. Feem ntau, peb tsuas xav tau 3 lub thauj tog rau nkoj, vim tias Roomba tej zaum yuav tsis txav mus rau hauv Z-axis, yog li 2D yuav txaus. Tab sis vim tias lub thauj tog rau nkoj nyob ntawm AC lub ntsiab ntsaws qhov siab (uas yog kwv yees li 30cm saum toj no hauv av) teeb tsa 2D yuav ua rau me ntsis txoj haujlwm kwv yees yuam kev. Yog li peb txiav txim siab kom muaj 4 lub thauj tog rau nkoj thiab thaj chaw hauv 3D.

Tam sim no raws li peb muaj txoj haujlwm ntawm Roomba peb cov kauj ruam tom ntej yog tswj Roomba los ntawm tib daim ntawv thov. Lub tswv yim yog siv qhov tseeb hauv av thiab kwv yees txoj kev huv huv rau neeg hlau. Nrog kev siv Localino peb tuaj yeem kaw cov lus tawm tswv yim thiab tswj cov neeg hlau los ntawm daim ntawv thov PC.

Teeb cov lus

Muab tso rau Localino thauj tog rau nkoj hauv chav ntawm qhov sib txawv x, y txoj haujlwm thiab peb ntawm lawv ntawm tib txoj haujlwm z. Muab ib qho ntawm plaub qhov thauj tog rau nkoj ntawm qhov siab sib txawv z rau ib chav. Nco ntsoov tias muaj kev pov hwm zoo los ntawm Localino lossis, uas yuav txav nrog Roomba.

Txhua tus thauj tog rau nkoj muaj tus lej cim cim uniqe, uas tau tshwm rau ntawm tus lej barcode ntawm Localino thiab tuaj yeem nyeem tawm nrog "kev teeb tsa hauv zos" cov cuab yeej.

Nco tseg cov haujlwm hauv X, Y, Z thiab ID tus thauj tog rau nkoj. Qhov no xav tau rau Localino Processor Software thiab yuav tsum tau hloov kho hauv "localino.ini" cov ntaub ntawv hauv daim nplaub tshev "LocalinoProcessor"

Cov thauj tog rau nkoj yuav tsum taw tes rau sab saud lossis qis dua hauv Z (thaum XY cheeb tsam tau npog), tab sis tsis yog nyob hauv qhov kev taw qhia ntawm thaj chaw npog. Cov thauj tog rau nkoj yuav tsum tsis txhob npog los ntawm hlau lossis lwm yam khoom siv teeb liab cuam tshuam rau cov khoom. Yog tias qhov no ua tsis tau, tseem yuav tsum muaj huab cua sib txawv ntawm cov khoom siv thiab lub thauj tog rau nkoj.

… Ntxiv tuaj

Kauj Ruam 4: Hloov kho Python Software

nyob twj ywm. ntau tuaj.

Pom zoo: