使用DHT11測量溫度與濕度並顯示在I2C的2x16螢幕,使用藍牙傳送到手機
Arduino配線圖
Arduino程式碼
實驗所遭遇問題
(1)藍牙一次傳送一個Byte資料,因為溫度與濕度資料可以使用1個Byte儲存,所以程式中第31與32行,使用byte強迫型別轉換。
AppInventor介面與程式碼
每秒接收自藍牙的資料顯示在TextBox1與TextBox2。
實驗圖片
驅動程式下載網址
LiquidCrystal_V1.2.1.zip https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/
DHT11.zip http://dalxxdht11.blogspot.tw/2012/12/dht11-library-for-arduino-uno.html
參考資料
(1)Arduino 使用 1602 IIC(I2C) LCD 點陣液晶模組https://blog.gtwang.org/iot/ywrobot-arduino-lcm-1602-iic-v1-lcd-display/
(2)DHT11 Library for ARDUINO (UNO) http://dalxxdht11.blogspot.tw/2012/12/dht11-library-for-arduino-uno.html