Cov txheej txheem:

LED Tsheb Teeb Pom Kev Nrog Python: 4 Kauj Ruam
LED Tsheb Teeb Pom Kev Nrog Python: 4 Kauj Ruam

Video: LED Tsheb Teeb Pom Kev Nrog Python: 4 Kauj Ruam

Video: LED Tsheb Teeb Pom Kev Nrog Python: 4 Kauj Ruam
Video: Tik Tok || Tseem Nco Koj Thiab Kuv P15 2024, Hlis ntuj nqeg
Anonim
Image
Image
Teeb tsa Circuit
Teeb tsa Circuit

Cov ntawv qhia no yuav qhia koj yuav ua li cas thiaj tsim tau qee qhov txias tsheb kauj vab teeb uas tsim tau nrog Python. Ua ntej tshaj, xyuas kom koj muaj tag nrho cov khoom siv:

  • Gemma M0 Microcontroller
  • 10k Potentiometer
  • 1m NeoPixel LED sawb 30 pixels/meter
  • USB Roj teeb pob

Cov nab kuab thiab cov laug cam tuaj yeem muaj txiaj ntsig zoo rau kev debug sai sai ua ntej txhim kho

Kauj Ruam 1: Teeb Teeb

Teeb tsa Circuit
Teeb tsa Circuit
  • NeoPixel Power (liab) -> Gemma Vout
  • NeoPixel Analog (dawb) -> Gemma A1
  • NeoPixel Av (dub) -> Gemma GND
  • Potentiometer Power (liab) -> 3Vo
  • Potentiometer Analog (dawb) -> Gemma A2
  • Potentiometer Av (dub) -> Gemma GND

Yog tias koj siv NeoPixel sawb uas ntau dua ~ 1m ces yuav tsum muaj lub zog ntxiv (5V> 2A) (yuav tsum pom daim duab qhia chaw)

Kauj ruam 2: Uploading Code

Image
Image

Tom qab txuas lub Circuit Court, ntsaws koj lub Gemma m0 rau hauv koj lub computer ntawm usb. Xyuas kom tseeb tias koj lub usb cable txhawb lub zog thiab cov ntaub ntawv txwv tsis pub koj tsis tuaj yeem tso tus lej.

Yog tias koj lub Gemma m0 tsis tshwm raws li usb tsav (CIRCUITPY) thaum ntsaws rau hauv koj lub computer ces thov ua raws cov lus qhia ntawm: https://learn.adafruit.com/adafruit-gemma-m0/over… teeb tsa cov tsav tsheb

Cov cai rau txoj haujlwm no tau tshaj tawm rau pej xeem ntawm no:

Rub tawm "main.py" thiab tso nws mus rau hauv koj lub gemma's file system.

Kauj ruam 3: ???

puas muaj leej twg puas paub qib 3?

Kauj ruam 4: Nyiaj tau los

Image
Image

Muab daim kab xev rau txhua yam!

Cov hlua LED no tuaj yeem yooj yim txuas rau lub tsheb kauj vab nrog qee cov kab xev thiab cov zauv sib txuas. Zoo meej rau Burning Man

Pom zoo: