在建置一个执行初始化与设定变数初始值的 setup( ) 函式之后,紧接会执行 loop( ) 函式。loop( ) 正如其名字所示,它会连续且重复的执行,让你的程式产生动作及回应;使用它来控制你的 86Duino 板动作。 范例 语法参考主页面 本页由热血青年 LBL 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
86Duino 板在开始执行 sketch 程式码(注1)时会先呼叫 setup( ) 函式,利用它去初始化变数、pin 脚模式、启动宣告的 libraries 等等…,这个函式在 86Duino 板通电或重置后只会执行一次。 范例 注1:Arduino/86Duino 将程式码称为 sketch,相关说明请参考此连结。 语法参考主页面 本页由热血青年 LBL 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.