Transcript 認識Arduino
‹#› 認識 Arduino 報告人:鄭銘雄 日期: 2012/11/13 資料來源:http://coopermaa2nd.blogspot.tw/2010/12/arduino-arduino.html ‹#› Arduino 唸法 ARRRR, / / DWEE, just say "do we" fast / / NO, as in no. ”ARRR-DWEE-NO” ‹#› 大綱 1. Arduino 是什麼? 2. Arduino 的硬體種類、擴充板與感測器 3. Arduino 應用實例 4. Arduino 實作練習 ‹#› 1. Arduino 是什麼? ‹#› Arduino 是一張微控制器板子 USB to Serial Digital In/Out Pins USB Port Atmega328p Power Supply Power Pins Analog Input Pins ‹#› Arduino UNO 硬體規格 微控制器 ATmega328 工作電壓 5V 輸入電壓(建議) 7-12V 輸入電壓(限制) 6-20V 數位 I/O Pins 14 支(其中有 6 支腳位可提供 PWM 輸出) 類入 Input Pins 6 支 I/O pin 直流電流 40mA 3.3V pin 直流電流 50mA Flash 記憶體 32KB, 其中 0.5KB 拿去給 bootloader 使用 SRAM 2KB EEPROM 1KB 時脈 16MHz ‹#› Arduino的功能 使用者可以接上各種電子裝置,例如 LED 、 喇叭、馬達、開關、溫濕度感測器、紅外線發 射與接收器、LCD 顯示裝置,以及 Ethernet, WiFi, XBee, Bluetooth, RFID, GPS 等各種 通訊模組。 配合程式,就能做出各樣的自動控制應用,如 溫度感測器控制風扇的運轉、可變電阻控制燈 光的明暗、控制馬達的轉速、紅外線遙控家電 、利用伺服機(Servo)控制機械手臂或機器人 ,以及製作自走車、飛行器等等。 ‹#› Arduino的特色 開放源碼。不僅軟體是開放源碼,連硬體也是 開放的。開發軟體用的 IDE 可免費下載,以及 電路設計圖也可以從網路上下載。 資源多。由於 Arduino 開放的精神,很多人 都樂於分享他們的作品,所以網路上有非常多 的資源。。 物美價廉。Arduino 控制板約略 30 美元左右 ,可以說是俗擱大碗。 ‹#› Arduino 社群網站 Main Site, Blog, Wiki, Forum and Store ‹#› Arduino 程式編輯軟體 Open Source Cross Platform Windows Mac OS X Linux Simple UI (Easy to Use) ‹#› 內建範例程式 ‹#› 內建功能函數庫 ‹#› 2. Arduino 種類, 擴充板 與 感測器 ‹#› Arduino 硬體種類 UNO Mega Duemilanove Nano ‹#› Arduino硬體種類 LilyPad Mega ADK Mini ‹#› Arduino 的擴充板 ‹#› Shields Motor Shield Input Shield microSD Shield Mp3 Shield Touch Shield SEMeter Shield (Smart Meter) ‹#› Shields Buzzer LCD Vibrator OLED Relay LED Matrix ‹#› Communication Shields Ethernet Bluetooth WiFi GPRS RFID WiFly ‹#› Communication Shields GPS RFM12B (Hope RF) XBee nRF24L01 (Nordic) ‹#› Sensors Photocell (light sensor) Joystick Color sensor Rotation sensor (potentiometer) Sound Sensor Water Sensor ‹#› Sensors Temperature/Humidity Ultrasonic Sharp IR Sensor Compass (電子羅盤) PIR Tri-Axis Accelerometer (三軸加速度計) ‹#› Sensors AC Current Sensor Infrared Receiver Hall Sensor (碰場感應) Flex Sensor (彎曲傳感) CO2 Sensor Flame Sensor (火焰感測) ‹#› Sensors IR Thermometer Polar Heart Rate Sensor Smoke Detector RTC Pressure pH Sensor ‹#› Arduino應用 ‹#› 穿戴式科技 http://bitly.com/y6kqVo ‹#› Heart Rate Monitor Interface ‹#› Scratch for Arduino http://bitly.com/z1IsLz ‹#› ‹#› Electronic Drum http://bitly.com/yFC1M6 ‹#› ‹#› Soundmachine http://bitly.com/ySt3vZ ‹#› DIY IRRemote http://bitly.com/w9FCxa http://bitly.com/xjiWfv (一系列的教學) IRBubble = Relay + IR sensor ‹#› Barcode scanner ‹#› Robots and Robots ‹#› BoeBot 改裝 Original controller by BasicStamp ‹#› ArduSpider http://bitly.com/zrjMg2 ‹#› Lego and Arduino http://bitly.com/wLBvY0 NXShield ‹#› Motoduino http://bit.ly/NDtKwQ ‹#› ‹#› Phone Hardware Interface Camera Compass – 電子羅盤 Light Sensor G-Sensor And more: •Proximity Sensor •Temperature sensor •Multi-touch Screen •Trackball •Microphone •… Vibrator – 震動馬達 ‹#› Android + Arduino ‹#› Arduino-Sprinkler http://bitly.com/wdrPee ‹#› ‹#› Arduino 實作練習 實作0:驅動程式安裝+燒錄測試 實作1:LED閃爍 實作2:光敏電阻感測 (A/D) 實作3:LED亮度控制 (PWM) 實作4:光敏電阻控制 LED 亮度 實作5:LCD液晶顯示器控制 實作6:LCD+光敏電阻+LED ‹#› 實作0 驅動程式:arduino-0023 \drivers 驅動成功: 我的電腦 \裝置管理員 ‹#› 連接電腦與 Arduino ‹#› Blink – LED閃爍 ‹#› 按 燒錄程式 燒錄中 鈕燒錄程式 ‹#› On board LED will start to blink On board LED on Pin 13 ‹#› 實作1~4 程式範例 ‹#› LED與光敏電阻電路 ‹#› 實作5~6 程式範例 ‹#› LCD 電路 PIN 13 PIN 11 PIN 5 PIN 3 PIN 1