Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Txhim Kho CircuitPython Libraries
- Kauj Ruam 2: Txuas Cov Khoom Siv
- Kauj Ruam 3: Dimming LED Siv Pulse-Dav Modulation
- Kauj Ruam 4: QHIA Nrog CircuitPython
Video: Siv Kitronik Inventor's Kit Nrog Adafruit CLUE: 4 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Los ntawm kevinjwaltersFollow More los ntawm tus sau:
Kitronik Inventor's Kit rau BBC micro: me ntsis yog qhov qhia zoo rau microcontrollers nrog cov khoom siv hluav taws xob siv lub khob cij. Cov khoom siv no tau tsim los siv nrog pheej yig BBC micro: me ntsis. Phau ntawv qhia ntxaws uas los nrog cov khoom suav nrog MakeCode piv txwv siv Blocks thiab JavaScript sib npaug code rau ob peb qhov haujlwm kawg. Qhov no zoo dua rau cov pib thiab cov menyuam yaus tshaj li C/C ++ xav tau rau Arduino-style programming. Kitronik tseem muab MicroPython cov qauv ntawm cov lej ntawm lawv lub vev xaib hauv qab Cov Khoom Tsim Kho Cov Khoom Siv Ntxiv Ntxiv seem.
Adafruit CLUE yog qhov ua tau zoo dua ntawm cov micro: me ntsis nrog cov txheej txheem nrawm dua, puv xim 240x240 LCD npo, sib txuas ntawm ntug sib xws, ntau lub ntsej muag thiab lub ntsej muag me me hais lus. Kev sib txuas ntawm ntug yog qhov tseem ceeb thiab tso cai rau siv lub rooj tsav khoom no nrog ntau yam khoom lag luam uas twb muaj lawm xws li Cov Khoom Tsim Khoom. CLUE tam sim no txhawb nqa Arduino-style programming thiab CircuitPython. CircuitPython yog qhov muab los ntawm MicroPython - nws zoo sib xws tab sis muaj qee qhov sib txawv, tshwj xeeb tshaj yog nyob ib ncig ntawm lub tsev qiv ntawv.
Txoj haujlwm no qhia pom yuav siv CircuitPython cov tsev qiv ntawv ntawm CLUE kom ua raws li micro: me ntsis microbit thiab cov tsev qiv nkauj. Qhov no tso cai rau MicroPython cov cai kom ua raws li-yog rau kaum qhov haujlwm hauv Tus Tsim Cov Khoom thiab ob txoj haujlwm ntxiv los ntawm lub vev xaib. CLUE kuj tseem tuaj yeem siv rov sau txhua txoj cai hauv CircuitPython tab sis ob khub ntawm cov tsev qiv ntawv no muaj txoj hauv kev sai sai kom pib nrog cov khoom siv.
Ib qho kev ua kom pom tau zoo muaj kev pom ntxiv ntawm cov pins (pawm) raws li lawv tau nyeem los lossis sau rau. Qhov no qhia meej meej tias kev siv tswv yim thiab cov txiaj ntsig tau siv dab tsi uas tuaj yeem txhim kho txoj kev kawm paub.
Nco tseg: muaj qhov sib txawv ntawm cov khoom siv muaj rau Arduino Uno lossis Maker Uno Plus: Kitronik Inventor's Kit rau Arduino.
Khoom siv
- Kitronik Inventor's Kit rau BBC micro: me ntsis
- Adafruit NTAWV
Kauj Ruam 1: Txhim Kho CircuitPython Libraries
Yog tias pawg thawj coj tsis tau muaj CircuitPython ntawm nws ces ua raws cov lus qhia no thiab CIRCUITPY tsav yuav tsum tshwm sim. Cov ntawv tuaj yeem lees paub los ntawm kev tshuaj xyuas cov ntaub ntawv boot_out.txt lossis txuas rau REPL ntawm cov ntawv txuas hauv USB.
Cov tsev qiv ntawv hauv qab no yuav tsum tau rub tawm (nyem txoj cai thiab Txuag txuas li …) thiab muab tso rau hauv phau ntawv teev npe ntawm CIRCUITPY tsav.
- microbit.py
- nkauj.py
- display_pin.py
Display_pin lub tsev qiv ntawv yog qhov vam khom ntawm lub tsev qiv ntawv me me. Lub tsev qiv ntawv adafruit_display_text yog kev vam khom ntawm lub microbit thiab display_pin cov tsev qiv ntawv thiab tuaj yeem muab rho tawm los ntawm Adafruit lub tsev qiv ntawv pob.
Adafruit CircuitPython Library bundles - rub tawm qhov no rau adafruit_display_text lub tsev qiv ntawv - daim duab saum toj no qhia qee qhov lwm lub tsev qiv ntawv muaj txiaj ntsig uas xav tau yog tias koj xav siv lub ntsuas cua, ntsuas thiab ntsuas pom.read_light_level ()
Cov program hauv qab no tuaj yeem rub tawm los qhia qee qhov peev xwm pom tau.
microbitlibemu_simpletest.py
Qhov no yuav tsum tau muab tso rau hauv cov npe saum toj kawg nkaus hauv CIRCUITPY thiab hloov pauv mus rau code.py.
Kauj Ruam 2: Txuas Cov Khoom Siv
Cov qauv hais los saum toj no tau tsim los siv nrog cov khoom siv txuas nrog micro: ntsis/CLUE raws li Kitronik Kev Tshawb Fawb 3. Kitronik phau ntawv qhia yuav ua li cas txuas cov no.
Nov yog cov ntsiab lus ntawm cov khoom siv thiab kev sib txuas.
- pin0 - lub laub khawm hloov uas txuas cov tswv yim rau hauv av.
- pin1 - 10k linear potentiometer.
- pin2 - liab LED nrog 47k resistor hauv koob.
- pin4 - tus hais lus piezo (qhov no tsis yog ib feem ntawm thawj qhov kev sim tab sis muaj txiaj ntsig zoo los ntsuas lub tsev qiv ntawv nkauj).
Kauj Ruam 3: Dimming LED Siv Pulse-Dav Modulation
Txoj haujlwm CLUE tau raug cuam tshuam ua ntej ua yeeb yaj kiab siv REPL ntawm cov ntawv txuas hauv USB. Tswj-D raug nias kom tawm REPL thiab pib qhov program.py.
Cov tsev qiv ntawv tau rub ua ntej hauv qhov program:
los ntawm microbit ntshuam *
ntshuam suab paj nruag
Tom qab ntawd "microbit" tau nthuav tawm los ntawm kev nqes mus rau hauv cov ntawv pom hom, ua raws los ntawm "tsev qiv ntawv" hauv hom kev pom yooj yim (tam sim no qeeb me ntsis), tom qab ntawd "ua raws ntawm CLUE" hauv hom kev txhim kho.
display.mode = "ntawv"
display.scroll ("microbit") display.mode = "basic" display.scroll ("library") display.mode = "enhanced" display.scroll ("emulation on CLUE") display.show (Image. SMILE) pw (2000)
Ob qho scroll () thiab qhia () hauv kev txhim kho hom qhia tag nrho kab ntawv ntawm CLUE lub vijtsam kom yooj yim nyeem. Raws li txhua tus pin tau siv lawv tso tawm ntawm lub vijtsam thiab raug ntsuas kom haum. Qhov siab tshaj tam sim no uas tuaj yeem pom yog 6.
display.show ("Kev sim 3 + suab paj nruag")
pw tsaug zog (2000) display.scroll ("Dimming LED") _ = pin1.read_analog () pw (2000) pin2.write_analog (pin1.read_analog ()) pw (2000) _ = pin0.is_touched () pw tsaug zog (2000) music.play (music. POWER_UP, tus pin4)
Cov nkauj ua si ntawm tus pin4 hauv qhov piv txwv no. Zoo li lub micro: kev siv me ntsis nws ua rau tus pin0 los ntawm lub neej ntawd. CLUE's onboard speaker kuj tseem tuaj yeem siv los ntawm kev dhau tus nqi (khoom) tus hais lus.
Cov cai hauv qab no yog ua raws Kitronik's MicroPython code uas tau los ntawm lawv qhov kev tsim MakeCode. Nws tau hloov kho tas li txhawm rau nyeem tus pin1 thiab sau rau tus pin2 yog tias lub LED tau qhib uas tau qhia los ntawm LightState tus nqi ntawm 1. Qhov no tso cai rau tus lej pom tus lej txhawm rau hloov kho tas li ntawm CLUE cov duab raws li pom hauv video thaum Allen (hex) qhov tseem ceeb tig lub potentiometer.
LightState = 0
Hloov = 0 thaum Tseeb: yog LightState == 1: pin2.write_analog (pin1.read_analog ()) lwm: pin2.write_digital (0) yog pin0.is_touched (): Hloov = 1 yog LightState == 0: LightState = 1 ntxiv: LightState = 0 thaum Hloov == 1: yog pin0.is_touched () == 0: Hloov = 0 yog button_b.was_pressed (): music.play (music. ODE, pin4)
Kauj Ruam 4: QHIA Nrog CircuitPython
Kitronik's MicroPython code tuaj yeem pom nyob hauv txhua qhov kev sim hauv Inventors Kit Ntxiv Ntu Cov Khoom Siv Dawb. Qee qhov cai tsuas yog muab tso rau hauv.hex cov ntaub ntawv. Txhawm rau kom yooj yim, tag nrho cov piv txwv tau rov ua dua ntawm no.
CLUE lub peev xwm tag nrho suav nrog Bluetooth Tsawg Zog tuaj yeem tshawb hauv CircuitPython nrog kev teeb tsa cov tsev qiv ntawv sai.
Adafruit qhov chaw muaj thawj phau ntawv qhia thiab ntau yam Kawm paub qhia rau CLUE. Peb daim duab saum toj no yog muab los ntawm:
- HLAU BLE MIDI Hnab looj tes
- CLUE Sensor Plotter
- QHIA Altimeter
Pom zoo:
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)
Kev Siv Xov Tooj Ntawm Lub Xov Tooj Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: Koj puas tau xav tsim qhov kev ua kom txias txias? Yog tias yog, ua li cas txog kev tsim ib qho ntawm cov neeg nyiam tshaj plaws thiab txhua tus nyiam cov khoom siv xws li Lub Xov Tooj Txawb !!!. Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav tsim lub xov tooj txawb yooj yim siv STM li cas
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab
Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Cov Neeg Siv Khoom Hloov: 8 Cov Kauj Ruam (nrog Duab)
Kev Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Kev Siv Hluav Taws Xob: Lub Arduino tuaj yeem siv los tswj cov cuab yeej los ntawm kev siv cov khoom siv yooj yim hloov pauv hloov chaw
Tsim Tus Neeg Txais Ham Los Ntawm Cov Khoom Siv Hluav Taws Xob: Siv lub Ramsey FR146 2 Meter FM Kit: 27 Cov Kauj Ruam (nrog Duab)
Tsim Tus Neeg Txais Ham Los Ntawm Cov Khoom Siv Hluav Taws Xob: Siv lub Ramsey FR146 2 Meter FM Kit: Sib dhos cov xov tooj cua - los ntawm kev ntim khoom mus rau kev ua haujlwm. Kev tsim kho yuav tsum tau siv cov khoom siv hluav taws xob yooj yim, suav nrog cov khoom sib txuas thiab cov transistors, thiab kho cov oscillator hauv zos. Suav nrog ntau yam kev qhia thiab cov lus qhia, ntxiv rau cov phooj ywg yooj yim