Professional Documents
Culture Documents
結構
數字 I/O
示為 INPUT 或 OUTPUT。
或 LOW。比如可以讀數字感測器。
模擬 I/O
機 PWM 調速或音樂播放。
擴展 I/O
需要一個 IO 口做74HC595的使能控制。
當 pin 輸入為低電平時,停止計時,然後返回該時間。
時間函數
返回記錄的參數,該參數溢出大概需要50天時間。
數學函數
• max(x, y) 求最大值
• abs(x) 計算絕對值
• sq(x) 平方
• sqrt(x) 開根號
三角函數
• sin(rad)
• cos(rad)
• tan(rad)
亂數函數
外部中斷函數
上升沿中斷,FALLING 下降沿中斷。
中斷使能函數
• interrupts() 使能中斷
• noInterrupts() 禁止中斷
串口收發函數
19200等。
• Serial.flush() 清空緩衝器。
• Serial.print(data) 串口輸出資料。
• Serial.println(data) 串口輸出資料並帶回車符。
/************Arduino 語言庫檔*************/
官方庫文件
• Ethernet - 乙太網控制器程式庫
• Servo - 舵機控制程式庫
• Stepper - 步進電機控制程式庫
非官方庫文件
• DateTime - a library for keeping track of the current date and time in software.
• Firmata - for communicating with applications on the computer using a standard serial
protocol.
• GLCD - graphics routines for LCD based on the KS0108 or equivalent chipset.
or MAX7219.
• LedControl - an alternative to the Matrix library for driving multiple LEDs with Maxim
台灣物聯科技有限公司 TaiwanIOT Technology Co., Ltd.
700 台南市北區賢北街 225 巷 12 號 TEL: 886-6-259-6159 FAX:886-6-280-3781 http://www.taiwaniot.com.tw
chips.
• OneWire - control devices (from Dallas Semiconductor) that use the One Wire
protocol.
• Simple Message System - send messages between Arduino and the computer
• SSerial2Mobile - send text messages or emails using a cell phone (via AT commands
/****************************************/