Cov txheej txheem:
Video: STM32F407VET6 Black Board thiab MicroPython: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
QHIA
Kuv tau hla hla pheej yig STM32F407 board los ntawm AliExpress
Kuv txiav txim siab sim nws nrog MicroPython.
STM32F407 zoo nkauj npaum li tus tswj xws li STM32F405 siv
thawj pyboard, tab sis tig tawm ntawm MicroPython nplooj ntawv rub tawm muaj DFU cov ntaub ntawv rau STM32F407 tshawb pom pawg thawj coj. Cov ntawv ntawd kuv tau sim ntawm Black board thiab nws ua haujlwm zoo nkauj tshwj tsis yog qee lub luag haujlwm prom 'pyb' lub tsev qiv ntawv.
Yog li nws zoo dua los siv 'tshuab' lub tsev qiv ntawv kom ntau li ntau tau.
Yog tias koj tsis xav tos ob peb lub lis piam ua ntej pawg thawj coj dub tuaj txog, xaj thawj lub rooj tshawb nrhiav tab sis nws kim dua ob zaug.
Muaj cov ntawv qhia yuav ua li cas rau nruab MicroPython ntawm STM32F4Discovery.
Khoom siv
STM32F407VET6 kev txhim kho lub rooj tsav xwm dub
Kauj ruam 1: SOFTWARE
Rub tawm DFU cov ntaub ntawv rau STM32F4 Discovery board. Rub tawm DfuSe USB lub cuab yeej hloov kho lub cuab yeej los ntawm STMicroelectronics lub vev xaib. Txhawm rau ua qhov ntawd koj yuav tsum tso npe dawb tus account. Nruab DfuSe cov cuab yeej ntawm koj lub computer.
Kauj Ruam 2: Tau txais daim phiaj npaj
Muaj ob tus neeg dhia ntawm lub rooj tsav xwm txuas tus pin BT0 thiab BT1 rau GND. Tsiv BT0 mus rau 3.3V (saib daim duab). Qhib "DfuSe Qhia Tawm" cuab yeej, txuas lub rooj tsavxwm rau USB. Koj yuav tsum pom nyob rau sab saum toj sab laug lub thawv '' STM ntaus ntawv hauv USB hom '', dua li hauv qab txoj cai nyem '' Xaiv '', xaiv rub tawm DFU cov ntaub ntawv thiab nyem '' UPGRADE ''. Tsiv BT0 jumper rov qab rau GND thiab rov txuas USB cable. PYBFLASH grive yuav tsum tshwm ntawm koj cov ntaub ntawv kaw lus. Koj tuaj yeem nyeem thawj MicroPython PDF "Kev saib xyuas thiab pub mis ntawm Pythons ntawm Redmond Zoo."
Kauj Ruam 3: Pib PROGRAMMING
Tam sim no koj tuaj yeem pib muaj kev lom zem nrog MicroPython. Koj tuaj yeem sau koj cov haujlwm hauv ib qho ntawv sau, txawm tias Windows Notepad. Kuv nyiam thawj Pyton 3 IDE. Qhib PYBFLASH tsav thiab qhib main.py los ntawm nws hauv koj cov ntawv sau. Cia peb pib nrog qhov yooj yim LED blink program. Muaj ob lub LEDS ntawm lub rooj tsavxwm cim D2 thiab D3 txuas nrog PA6 thiab PA7 tus pin ntawm tus tswj. Sau qhov program yooj yim no hauv koj phau ntawv kho lus:
ntshuam tshuab, sijhawm #import micropython cov tsev qiv ntawv
coj = tshuab. Pin ('A6', tshuab. Pin. OUT) #muab tus pin PA6 raws li tso tawm
thaum Muaj Tseeb: #infinite loop
led.low () #switch coj rau
time.sleep (1) #tso coj mus rau ib pliag
led.high () #switch coj tawm
time.sleep (1) #tso nws tawm rau ib pliag
Txuag cov ntaub ntawv main.py rau koj lub rooj tsavxwm, nias lub pob pib dua LED D2 yuav tsum pib ntsais muag. Txoj hauv kev zoo tshaj los rov pib dua lub rooj tsavxwm yog los ntawm kab hais kom ua hauv REPL. Txhawm rau rub tawm thiab teeb tsa Putty. Txhawm rau siv Putty tau txais COM tus lej chaw nres nkoj rau pawg thawj coj los ntawm Tswj vaj huam sib luag> Tus thawj tswj ntaus ntawv. Thaum koj tau txais kev sib txuas, siv cov keyboard luv 'CTRL' + 'C' kom tsis txhob khiav qhov haujlwm ua ntej txuag qhov haujlwm tshiab thiab 'CTRL' + 'D' kom rov pib dua lub rooj tsavxwm tom qab txuag qhov program. Kuv pom tias yog txoj kev nyab xeeb tshaj plaws kom txuag tau thiab rov pib dua MicoPython cov haujlwm tsis yog tsuas yog txuas thiab rov txuas USB cable (thaum lub sijhawm txheej txheem no PYBFLASH tsav tuaj yeem ua tsis tau) Tam sim no, thaum kawg, cia ua LEDS D2 thiab D3 ntsais lwm qhov thiab nrawm dua:
ntshuam tshuab, sijhawm
coj = tshuab. Pin ('A6', tshuab. Pin. OUT)
led1 = tshuab. Pin ('A7', tshuab. Pin. OUT)
thaum Muaj Tseeb:
coj.low ()
sijhawm.s pw (0.5)
coj.high ()
sijhawm.s pw (0.5)
coj1.low ()
sijhawm.s pw (0.5)
coj1.high ()
sijhawm.s pw (0.5)
PS Koj tuaj yeem tau txais cov ntaub ntawv ntau ntxiv txog STM32F407 Black board ntawm GitHub thiab yog tias koj paub nrog Linux koj tuaj yeem sau DFU cov ntaub ntawv rau pawg tshwj xeeb no. Kuv tsis tau sim qhov ntawd. Kuv tsis muaj Linux tshuab tam sim no ua haujlwm.
Muaj kev lom zem nrog MicroPython!
Pom zoo:
NodeMCU Lua Pheej Yig 6 $ Board nrog MicroPython Kub thiab Vaum Logging, Wifi thiab Txawb Stats: 4 Cov Kauj Ruam
NodeMCU Lua Pheej Yig 6 $ Board nrog MicroPython Kub thiab Vaum Logging, Wifi thiab Txawb Stats: Qhov no yog huab cua huab cua chaw nres tsheb, koj tuaj yeem tshawb xyuas cov ntaub ntawv ntawm koj lub xov tooj lossis siv qee lub xov tooj raws li cov duab nyob nrog NodeMCU ntaus ntawv koj tuaj yeem teev cov ntsuas kub thiab cov av noo sab nraum. , hauv chav, tsev cog khoom, lab, chav txias lossis lwm qhov chaw ua tiav
Yuav Tsim Li Cas thiab Ntxig Ib Lub Rooj Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: 11 Cov Kauj Ruam
Yuav Tsim Li Cas thiab Ntxig Cov Lus Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: Koj puas tau muaj cov ntaub ntawv ntau uas koj ua haujlwm nrog thiab xav rau koj tus kheej … " Kuv yuav ua li cas ntawm cov ntaub ntawv no saib zoo dua thiab nkag siab yooj yim dua? " Yog tias yog, tom qab ntawd lub rooj hauv Microsoft Office Word 2007 yuav yog koj cov lus teb
Txuas Kev Ua Haujlwm thiab Arduino thiab Ua 7 Segment thiab Servo GUI Controller: 4 Cov Kauj Ruam
Kev Sib Txuas Ua Haujlwm thiab Arduino thiab Ua 7 Segment thiab Servo GUI Controller: Rau qee qhov haujlwm koj yuav tsum tau siv Arduino raws li nws muab lub platform yooj yim qauv ua qauv tab sis tso saib cov duab hauv kev saib xyuas ntawm Arduino tuaj yeem siv sijhawm ntev thiab tseem nyuaj ua. Koj tuaj yeem tso saib kab lus ntawm Arduino Serial Monitor bu
8 Relay Tswj Nrog NodeMCU thiab IR Txais Txais Siv WiFi thiab IR Chaw Taws Teeb thiab Android App: 5 Kauj Ruam (nrog Duab)
8 Relay Tswj Nrog NodeMCU thiab IR Txais Txais Siv WiFi thiab IR Chaw Taws Teeb thiab Android App: Tswj 8 qhov hloov pauv hloov siv nodemcu thiab ir tus txais tshaj wifi thiab ir chaw taws teeb thiab hauv app.the ir tej thaj chaw deb ua haujlwm ywj pheej ntawm wifi txuas. NTUJ
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: 13 Kauj Ruam (nrog Duab)
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: Intro: Qhov no yog Txoj Haujlwm uas siv Arduino board, Sensor (DHT11), lub khoos phis tawj Windows thiab Kev Ua Haujlwm (rub tawm dawb) program los tso saib Kub, Cov ntaub ntawv vaum hauv digital thiab bar kab ntawv, tso tawm lub sijhawm thiab hnub tim thiab suav lub sijhawm suav