首頁 解決方案 IoT SoC / MCU Video SoC 我要加入開發 Standard SDK Ameba ARDUINO Amazon FreeRTOS Arm Mbed Enabled Ameba MicroPython 雲服務 如何使用 使用範例 裝置註冊 論壇 相關連結 瑞昱網站 Ameba MakerPro AmebaIoT China Powered by Ameba AirBox in 龍山寺 AirBox in 台大 登入 Menu 首頁 解決方案 IoT SoC / MCU Video SoC 我要加入開發 Standard SDK Ameba ARDUINO Amazon FreeRTOS Arm Mbed Enabled Ameba MicroPython 雲服務 如何使用 使用範例 裝置註冊 論壇 相關連結 瑞昱網站 Ameba MakerPro AmebaIoT China Powered by Ameba AirBox in 龍山寺 AirBox in 台大 登入 Choose a language 繁體中文 简体中文 English Ameba Arduino: [RTL8195AM] [RTL8710AF] GPIO - 使用DS18B20溫度感測器 材料準備Ameba x 1DS18B20 x 1範例說明DS18B20 是一款溫度感測器,可量測範圍-55℃~+125℃,範圍在-10℃~+85℃時精準度為±0.5℃,它使用單線的資料線,並且在微秒(microseconds)等級的時間間隔裡處理資料的輸入與輸出。Ameba使用OneWire library ( http://www.pjrc.com/teensy/td_libs_OneWire.html )控制DS18B20。Ameba修改了這份library裡關於需要微秒等級的GPIO API,所以請至這裡下載修改過的library:https://github.com/ambiot/amb1_arduino/raw/master/Arduino_libraries/OneWire.zip下載之後,參考Arduino官方網站的教學文章將zip檔的library加入Ameba:https://www.arduino.cc/en/Guide/Libraries#toc4接線的部份如下圖:我們打開範例 “File” -> “Examples” -> “AmebaOneWire” -> “DS18x20_Temperature”編譯並上傳至Ameba之後,按下Reset按鈕,可以在Serial Monitor看到底下結果:程式碼說明相關的API與文件說明可以至OneWire的原始官網找到說明http://www.pjrc.com/teensy/td_libs_OneWire.html 解決方案 IoT SoC / MCU Video SoC 我要加入開發 Standard SDK Ameba ARDUINO Amazon FreeRTOS Arm Mbed Enabled Ameba MicroPython 雲服務 如何使用 使用範例 裝置註冊 論壇 論壇 相關連結 瑞昱網站 Ameba MakerPro AmebaIoT China AirBox in 龍山寺 AirBox in 台大 Facebook Youtube Github Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved.