ESP8266 + Arduino IDE 1.6.5 + BH1750 光度感應器 快速測試

為了能快速測試 BH1750 加在 ESP8266 上 ,盡量使用 Arduino 原始程式上的腳位,我下載的BH1750 程式庫的腳位如下:

/*
  This is a simple code to test BH1750FVI Light senosr
  communicate using I2C Protocol
  this library enable 2 slave device address
  Main address  0x23
  secondary address 0x5C
  connect this sensor as following :
  VCC >>> 3.3V
  SDA >>> A4
  SCL >>> A5
  addr >> A3
  Gnd >>>Gnd

  Written By : Mohannad Rawashdeh

 */

程式是由 Mohannad Rawashdeh 撰寫 。

NodeMCU+BH1750
測試的輸出如下:

NodeMcu+BH1750
NodeMcu+BH1750

同樣的程式也可用 BH1750 與 Arduino UNO 來測 ,聯接圖如下:

Arduino UNO + BH1750


留言

張貼留言

請多指教

這個網誌中的熱門文章

Arduino 模擬 Modbus Slave

Arduino IDE 1.6.5 + BH1750 + CD74HC4067 多工器

【輕鬆工作家】使用 3D 印表機 製作一台 Arduino CNC GRBL 繪圖機