Arduino 教程.pdf
(1.84 MB, 下载次数: 11)
arduino 語法
• 掌握Arduino語法的三個學習關鍵
– Variables (變數)
– Structure (結構)
– Functions (函式, 方法)
• 類別庫 Libraries運用(最後面的實作會講)
Variables (變數)
• 資料型態
– Boolean , true or fasle
– Char , ‘a’, ‘b’, ‘c’
– Byte , B10010011
– Int , -32,768 ~ 32,767
– Unsigned int , 0 ~ 65,535
– Long , -2,147,483,648 ~ 2,147,483,647
– Unsigned long , 0 ~ 4,294,967,295
資料型態
– Float 單精度浮點數, 10^-38 ~ 10^38
– Double 雙精度浮點數, 10^-308 ~ 10^308
– String , “I’m Arduino”
– Array , char A[8] = {‘a’, ‘r’, ‘d’, ‘u’, ‘i’, ‘n’, ‘o’}
– Void , void setup()
|