Cov txheej txheem:

Teem Up rau Program Picaxe Via Shell Script (linux): 5 Kauj Ruam
Teem Up rau Program Picaxe Via Shell Script (linux): 5 Kauj Ruam

Video: Teem Up rau Program Picaxe Via Shell Script (linux): 5 Kauj Ruam

Video: Teem Up rau Program Picaxe Via Shell Script (linux): 5 Kauj Ruam
Video: Python! Extracting Text from PDFs 2024, Hlis ntuj nqeg
Anonim
Teem Up rau Program Picaxe Via Shell Script (linux)
Teem Up rau Program Picaxe Via Shell Script (linux)

Taug kev yooj yim los ntawm qhov uas qhia yuav ua li cas ua cov ntawv plhaub uas yuav nqes ib qhov program los ntawm ftp site tom qab ntawv sau nws ces rub nws mus rau picaxe. (Qhov no kuj yog kuv thawj zaug qhia)

Kauj Ruam 1: Yam Kuv Siv

Kuv Siv Dab Tsi
Kuv Siv Dab Tsi

Nov yog qhov kuv siv 1x ubuntu1x picaxe 08m1x breadboard2x ledjumper leadssome txoj hauv kev rau phiaj xwm picaxe kuv siv PICAXE021 tus qauv tsim qauv nrog jumper coj mus rau lub rooj noj mov

Kauj ruam 2: Teeb

Tam sim no peb xav tau ib qho chaw rau tsab ntawv kom khiav los ntawm cov lus qhia no Kuv txiav txim siab muab nws tso rau hauv ~/picaxe-ftp (~ txhais tau tias koj lub tsev nplaub tshev los ntawm txoj kev). Tam sim no peb xav kom tau txais qhov ua tiav, https://www.rev-ed.co.uk/software/picaxe.tgz tias lawv muaj txhua qhov ua tiav rau txhua qhov sib txawv ntawm picaxe. Tam sim no kuv tab tom siv 08m yog li kuv tau txais qhov ua tiav 'picaxe08m' thiab muab tso rau hauv phau ntawv teev npe tab sis koj tuaj yeem yooj yim hloov qhov ntawd rau koj cov ntawv. Yog li tam sim no koj yuav tsum muaj koj phau ntawv teev npe nrog qhov ua tiav hauv nws uas yog txhua yam.

Kauj ruam 3: Code

Tam sim no qhib koj cov ntawv sau lossis koj puas tau siv thiab muab cov lej no tso rau hauv. #!/Bin/shHOST = '0catch.com'USER =' picaxeprogramer.0catch.com'PASSWD = 'picaxetest'FILE =' test.bas ' # Nkag mus rau lub npe ntawm cov ntawv sau hauv qab noftp -n $ HOST << END_SCRIPTquote USER $ USER quote PASS $ PASSWDget $ FILEquit END_SCRIPT # Qhov ntawd yog qhov ftp ntu uas tau nkag rau hauv cov ntaub ntawv thiab txiav tawm./picaxe08m -c/dev/ttyS0 $ FILE # uas rub tawm cov ntawv mus rau picaxe hloov qhov no kom haum Txuag qhov no li picaxeprogramer.sh hauv tib daim nplaub tshev uas koj tso rau hauv qhov yooj yim dua. Koj kuj tseem tuaj yeem siv qhov chaw ftp yog tias koj xav tau kev hwm thiab tsis txhob cuam tshuam nrog nws.

Kauj ruam 4: Khiav qhov program

Khiav qhov Program
Khiav qhov Program
Khiav qhov Program
Khiav qhov Program

Tam sim no yog tias koj xav tau koj tuaj yeem teeb tsa qhov no kom ua haujlwm txhua 1h, 2h 5h lossis yam uas koj xav tau tab sis rau qhov pom zoo ntawm cov lus qhia no peb yuav cia li khiav nws. ntsais ntsais ntawm tus pin 1) thiab tom qab ntawd ntxiv cov coj ntawm tus pin 1 thiab tig rau. Tam sim no txav mus rau daim nplaub tshev uas cov ntawv sau thiab ua tiav yog thiab ua haujlwm qhov program los ntawm kev ntaus 'sh picaxeprogramer.sh'. nws yuav tsum khiav thiab txuas ntxiv rau program picaxe.

Kauj Ruam 5: Kauj Ruam Kawg

Kauj Ruam Kawg
Kauj Ruam Kawg
Kauj Ruam Kawg
Kauj Ruam Kawg

Tam sim no kuv paub qhov no ib leeg tsis muaj txiaj ntsig zoo tab sis yog tias koj nthuav dav rau qhov no koj tuaj yeem tuaj yeem hloov kho cov neeg hlau tswj lossis paub tseeb tias txhua yam koj cov neeg hlau tau hloov kho rau cov lus txib tshiab thiab kev tswj hwm tab sis txawm li cas los xij qhov koj txiav txim siab ua yog ua tiav rau koj. Qhov no yog daim vis dis aus ntawm lub plhaub ua haujlwm. (Thov txim rau lub koob yees duab tsis zoo yog ntau dua ntawm lub koob yees duab yees duab. Ntxiv rau lub suab nrov tom qab) Yog tias koj xav tau cov ntawv nrog me ntsis ntxiv rau nws sim qhov no#!/Bin/shHOST = '0catch.com'USER = 'picaxeprogramer.0catch.com'PASSWD =' picaxetest'FILE = 'test.bas' #Enter the name of the bas script hereNEWNAME = `date +%Y-%m-%d``.bas ' ftp -n $ HOST <

Pom zoo: