Cov txheej txheem:

Tswj MedeaWiz Sprite: 4 Cov Kauj Ruam
Tswj MedeaWiz Sprite: 4 Cov Kauj Ruam

Video: Tswj MedeaWiz Sprite: 4 Cov Kauj Ruam

Video: Tswj MedeaWiz Sprite: 4 Cov Kauj Ruam
Video: DJPeter - Spirit of The Shaman 2024, Kaum ib hlis
Anonim
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite
Tswj MedeaWiz Sprite

MedeaWiz Sprite (https://www.medeawiz.com/) yog lub tshuab hluav taws xob me me uas ua yeeb yaj kiab. Cov yeeb yaj kiab rau Sprite tuaj yeem nyob ntawm USB flash/ntiv tes xoo lossis ntawm daim npav SD. Sprite yuav ua ib qho vis dis aus los ntawm lub hauv paus hauv lub voj. Lwm cov vis dis aus nyob ntawm lub cuab yeej nyem tuaj yeem xaiv thiab ua si siv Sprite chaw taws teeb tswj.

Yuav los ntawm Amazon lossis los ntawm TeamKingsley

Sensor. Engine MICRO yog lub khoos phis tawj tswj hwm lub tshuab me me txhais tau tias cuam tshuam rau cov ntsuas thiab tswj ntau yam qauv. SEM tuaj yeem siv ua STEM cov cuab yeej kawm. Zoo heev los siv nrog sau los ntawm 37+ cov cim!

Yuav los ntawm CircuitGizmos

Sensor. Engine MICRO (SEM) Rev 4

Lub plawv ntawm SEM yog 32 me ntsis microcontroller nrog kev sib tham ua haujlwm siab txhais lus. Cov lus uas SEM siv yog BASIC niaj hnub no. Tsis zoo li cov lus dhau los, cov BASIC tshiab no tau teeb tsa. Nws txhawb subroutines thiab tsis xav tau kab lej. Nws yog hom lus zoo tshaj plaws rau SEM. Nws yog ib qho yooj yim kawm, thiab tseem muaj zog. Nws muaj kev txhawb nqa rau kev tawm tswv yim thiab kev tso tawm uas SEM xav tau.

SEM muaj I/O kab raws ntug sab saum toj ntawm PCB rau kev txuas mus rau ntau yam kev sib txuas. SEM tuaj yeem siv nrog lub tshuab luam ntawv tsis muaj kab laug sab rau kev tsim qauv. SEM kuj tseem tuaj yeem siv nrog lwm txoj hauv kev txuas hluav taws xob txhawm rau cuam tshuam rau cov qauv, khoom siv, thiab kev siv hluav taws xob.

Kauj ruam 1: Ua yeeb yaj kiab

Ua yeeb yaj kiab
Ua yeeb yaj kiab
Ua yeeb yaj kiab
Ua yeeb yaj kiab

Sprite kuj tseem tuaj yeem tshwm sim los ntawm kev hu xov tooj (lossis sib npaug "sib cuag qhuav" Circuit) los ua cov vis dis aus tshwj xeeb. Cov lus qhia uas tuaj nrog Sprite (phau ntawv tuaj yeem rub tawm ua ntej yuav khoom) qhia tias yuav siv lub pob li cas los ua kom Sprite ua cov vis dis aus. Cov lus qhia tseem qhia yuav ua li cas Programmable Logic Controller (PLC) lossis PIR tsab ntawv tsa suab sensor tuaj yeem txuas ncaj qha mus rau Sprite txhawm rau ua yeeb yaj kiab.

Qhov tshwm sim no tso cai rau lub pob lossis lub cuab yeej nrog cov khoom sib txuas qhuav kom ua rau cov ntaub ntawv ib leeg. Kev ua kom nyuaj dua tuaj yeem ua tiav los ntawm kev siv Sensor. Engine MICRO los ntsuas ib lossis ntau yam kev mob raws li lub tswv yim nkag, lossis teem sijhawm. SEM yuav txuas rau Sprite ntawm Sprite's I/O chaw nres nkoj thiab siv cov lus txib los tswj Sprite.

Kauj Ruam 2: Ua Rau Los Ntawm Sensor. Engine: MICRO

Ua los ntawm Sensor. Engine: MICRO
Ua los ntawm Sensor. Engine: MICRO
Ua los ntawm Sensor. Engine: MICRO
Ua los ntawm Sensor. Engine: MICRO

Sprite I/O chaw nres nkoj muab kev sib txuas hauv av nrog rau +5V (100mA) uas tuaj yeem siv los txhawb SEM. Kev tswj hwm ntawm Sprite los ntawm SEM tau ua tiav siv Tx thiab Rx cov kab ntawv txuas. Cov kev sib txuas rau I/O chaw nres nkoj tau muab rau hauv phau ntawv Sprite thiab qhia ntawm no.

Hauv daim duab saum toj saud lub npe hu ua "Microprocessor" yuav yog Sensor. Engine MICRO. SEM txuas nrog Sprite nrog cov kab ke me me. Cov xaim dub yog qhov siv hauv av, xaim liab muab 5V rau lub zog SEM. (Kev sib txuas thaum lub sijhawm txhim kho raws li kev txuas USB muab 5V.)

Cov xov hlau xiav thiab ntsuab yog kev sib txuas lus txuas. Rau cov cai no cov ntaub ntawv tau txais los ntawm Sprite tsis raug siv.

Kauj Ruam 3: Txoj Haujlwm

Cov piv txwv txoj haujlwm yog qhov yooj yim dua: Qhib los ntawm cov lej (0 txog 10) thiab thaum xaiv, ua si cov ntawv cuam tshuam nrog tus lej.

'Sprite Controller * 4 kab lus piav qhia txoj haujlwm tshwm hauv cov ntawv xaiv' * txog rau tus lej 21 tom qab ib qho appostrophe nkaus xwb. ' *' * '------------------------------- *

OPTION QHIA

OPTION DEFAULT TSIS MUAJ OPTION AUTORUN ON

'====================================================

'Teeb Code' Cov teeb tsa teeb tsa ib zaug thaum koj pib qhov haujlwm no =================================== ====================================

'S. E: MICRO khawm cuam tshuam thiab xeev

'Zoo ib yam rau SEM apps, thiab lwm yam SETPIN 7, INTL, semRedBtnInt, PULLUP SETPIN 24, INTL, semYelBtnInt, PULLUP SETPIN 26, INTL, semGrnBtnInt, PULLUP DIM semRedBtn AS INTEGER' Button States DIM sem 0 semYelBtn = 0 semGrnBtn = 0

DIM FileNum AS INTEGER

DIM FileNumLimit AS INTEGER FileNum = 0 FileNumLimit = 10

Ntawv 0, 0, "Sprite Controller",, 3, 1

TEXT 64, 12, ""+STR $ (FileNum)+"", C, 2, 2 TEXT 0, 57, "Rov Qab Frwd Xaiv",, 3

Ua

YOG semRedBtn> 1 THEN

semRedBtn = 0 CLS FileNum = FileNum - 1 IF FileNum <0 THIAB FileNum = FileNumLimit Text 0, 0, "Sprite Controller",, 3, 1 TEXT 64, 12, ""+STR $ (FileNum)+"", C, 2, 2 TEXT 0, 57, "Rov Qab Frwd Xaiv",, 3 ENDIF

YOG semYelBtn> 1 THEN

semYelBtn = 0 CLS FileNum = FileNum+1 IF FileNum> FileNumLimit THEN FileNum = 0 Text 0, 0, "Sprite Controller",, 3, 1 TEXT 64, 12, ""+STR $ (FileNum)+"", C, 2, 2 TEXT 0, 57, "Rov Qab Frwd Xaiv",, 3 ENDIF

YOG semGrnBtn> 1 THEN

semGrnBtn = 0 Qhib "COM1: 9600" raws li #1 PRINT #1, CHR $ (FileNum); ZOO TSHAJ #1 ENDIF LOOP

'=====================================================

'SE: MICRO Button Interrupt Subroutines' Common to the SEM apps, thiab lwm yam. ==================== Ua tsaug

'Liab/Daj/Ntsuab ntsuab khawm cuam tshuam ib txwm ua

'Txheem SEM khawm niaj hnub ua. 'Xeem semRedBtn> 1 rau khawm nias,> x rau khawm ntev nias

SUB semRedBtnInt

semRedBtn = 1 DO: PAUSE (5): semRedBtn = semRedBtn + 5: LOOP WHILE PIN (7) = 0 PAUSE (20) END SUB

SUB semYelBtnInt

semYelBtn = 1 DO: PAUSE (5): semYelBtn = semYelBtn + 5: LOOP WHILE PIN (24) = 0 PAUSE (20) END SUB

SUB semGrnBtnInt

semGrnBtn = 1 DO: PAUSE (5): semGrnBtn = semGrnBtn + 5: LOOP WHILE PIN (26) = 0 PAUSE (20) END SUB

Kauj Ruam 4: Kev Ua Yooj Yim

Yooj Yim Ua Haujlwm
Yooj Yim Ua Haujlwm

Tus lej loj nyob ntawm cov zaub qhia tau tias cov ntaub ntawv twg raug ua si, lossis raug xaiv zaum kawg.

Lub pob liab liab txo tus lej cov ntaub ntawv. Lub pob daj ntxiv cov lej ntawm cov ntawv.

Lub pob ntsuab xaiv/ua cov lej suav.

Pom zoo: