發表文章

目前顯示的是 6月, 2026的文章
  4. (10pts) Please answer the following questions (in simple): a) What's the name of ARM-based micro-controller we used in our class? [Answer in the WORD file] (Gives the platform name) (1pts) b) How to return datas from micro-controller to PC? (Gives the name of comm. interface) (1pts) c) From (b), which software tool we used in PC for comm.? (Gives the name of tool) (1pts) d) How to define pin A0 as a analog input object named analN? (Gives the code of declare in single line) (1pts) e) From (d), how to get the values from that pin and puts into varrible named ana_val? (Simply write down the code in single line) (Ipts) f) From (e), please answer the range of the analog reading. (Gives the range with min. ~ max.) (Ipts) g) Please list four different kinds of components we used in exp. lab. (In Chinese) (4pts)
 void setup() {     Serial.begin(9600);     int oddSum = 0;     int evenSum = 0;     for(int i = 10; i <= 300; i++)     {         if(i % 2 == 1)             oddSum += i;     }     for(int i = 40; i <= 220; i++)     {         if(i % 2 == 0)             evenSum += i;     }     Serial.print("Odd Sum = ");     Serial.println(oddSum);     Serial.print("Even Sum = ");     Serial.println(evenSum); } void loop() { }