Taiwan Population Density Learning Machine

Introduction: Taiwan Population Density Learning Machine

讓人知道哪個地區的人口密度最高獲最低

Supplies

一個箱子 熱融膠 兩個按鈕 兩個黃色電阻 兩個藍色電阻 多條電線 兩個不同顏色LED燈

Step 1: Using Arduino to Make the Code

void setup(){ // put your setup code here, to run once:

pinMode( 2 , INPUT); // sets the digital pin as input pinMode( 13 , OUTPUT); // sets the digital pin as output pinMode( 4 , INPUT); // sets the digital pin as input pinMode( 12 , OUTPUT); // sets the digital pin as output }

void loop(){ // put your main code here, to run repeatedly: if (digitalRead( 2 )) { digitalWrite( 13 , HIGH ); // sets the digital pin on/off delay( 3000 ); // waits a few milliseconds } else { digitalWrite( 13 , LOW ); // sets the digital pin on/off } if (digitalRead( 4 )) { digitalWrite( 12 , HIGH ); // sets the digital pin on/off delay( 3000 ); // waits a few milliseconds } else { digitalWrite( 12 , LOW ); // sets the digital pin on/off } }

Step 2: Connect the Circuit

Step 3: Decorative Appearance

Step 4: Pros and Cons of My Device

優點就是可以讓人知道台北市是台灣中人口密度最高的城市,而台東縣是台灣人口密度最低的城市。

缺點是顯示的地點太少。

Be the First to Share

    Recommendations

    • Space Contest

      Space Contest
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest
    • Lamps and Lighting Contest

      Lamps and Lighting Contest

    Comments