Cov txheej txheem:

Circuit Playground Express Thermometer: 3 Kauj Ruam
Circuit Playground Express Thermometer: 3 Kauj Ruam

Video: Circuit Playground Express Thermometer: 3 Kauj Ruam

Video: Circuit Playground Express Thermometer: 3 Kauj Ruam
Video: Adafruit: Circuit Playground Express Unboxing HD 2024, Hlis ntuj nqeg
Anonim
Qhov Chaw Ua Si Hauv Chaw Ua Si Kub Kub
Qhov Chaw Ua Si Hauv Chaw Ua Si Kub Kub

Kuv xav tau tus pas ntsuas kub hauv chaw ua haujlwm. Ntau dua li yuav ib qho kuv siv Adafruit Circuit Playground Express los ua ib qho. Nws yog digital/quasi-analog. Cov xim qhia txog qhov kub thiab txias (ntsuab ntawm no - rau 70's), nrog tus lej NeoPixels qhia tus lej (yog li lub sijhawm ua haujlwm pom ntawm no yog 75). Thaum nws tsaus ntuj cov zaub tso tawm.

Khoom siv

Adafruit Circuit Playground Express

3D Tshuab Luam Ntawv (Kuv siv PLA)

M3 x 8 screws (x4) thiab M3 txiv ntoo (x4)

Daim kab xev sib nqus (https://www.amazon.com/gp/product/B073519752)

Kauj ruam 1: Mount

Mount
Mount
Mount
Mount
Mount
Mount
Mount
Mount

Kuv xav tau qee qhov airflow rov qab vim kuv tsis paub tseeb tias pawg thawj coj tau sov yuav cuam tshuam rau kev nyeem ntawv. Lub roob tau tsim hauv Fusion 360. Qauv muaj nyob rau ntawm Thingiverse (https://www.thingiverse.com/thing:3659694). Ntau dua li sim khaws cov ntsia hlau xov hauv PLA, Kuv muab qhov chaw tso M3 txiv ntoo rau hauv M3 screws.

Kauj Ruam 2: Txoj Haujlwm

Cov cai yog Circuit Python, siv Adafruit cov tsev qiv ntawv rau CPE. Cov cai tam sim no muaj nyob ntawm GitHub (https://github.com/KFW/CPE_thermometer) tab sis nws yog qhov yooj yim.

# Chaw Ua Haujlwm Tus Kheej Tus Kheej # rau Adafruit Circuit Python Express # Siv xim los qhia qhov ntsuas kub ntau, thiab tom qab ntawd neopixels rau qhov ntsuas kub tseeb # lub teeb pom kev zoo tig tawm NeoPixels yog tias nws tsaus ntuj los ntawm adafruit_circuitplayground.express ntshuam cpx ntshuam lub sijhawm BLANK = (0, 0, 0) XEEB = (0, 0, 24) # 50's BG = (0, 12, 12) # 60's GREEN = (0, 24, 0) # 70's ORANGE = (18, 6, 0) # 80's RED = (24, 0, 0) # 90's TEMP_COLOR = {5: BLUE, 6: BG, 7: GREEN, 8: ORANGE, 9: RED} thaum muaj tseeb: cpx.pixels.fill (BLANK) # xyuas kom pixels daws tshiab yog cpx.light> 10: # tsis txhob tso tawm temp yog tias chav tsaus ntuj temp = int (cpx.temperature * 1.8 + 32.5) # ntxiv 0.5 kom paub tseeb tias temp # hloov pauv kom raug yog temp 99: temp = 99 # hauv qhov xwm txheej tsis zoo nyob hauv 100's kaum = temp // 10 tus lej = temp%10 # rau temp xaus hauv '0' teeb tsuas yog pixel 0 (kaum pixel raws li teeb tsa) yog tus lej == 0: cpx.pixels [0] = TEMP_COLOR [kaum] # txwv tsis pub sau tus lej los ntawm 7 teev txoj hauj lwm: rau kuv hauv thaj tsam (tus lej): cpx.pixels [9 - i] = TEMP_COLOR [kaum tawm] # siv '9 -' ua txhaum ce pixels # hauv kev thim rov qab lub sijhawm. tsaug zog (60) # ncig txhua 60 vib nas this

Kauj ruam 3: Mount

Mount
Mount

Kuv tau siv qee daim kab xev sib nqus nyob tom qab txhawm rau txhim kho nws.

Pom zoo: