(SKU:DFR0483)FireBeetle Covers-Gravity Adapter Board

来自DFRobot Product Wiki
跳转至: 导航搜索
FireBeetle Covers-Gravity Adapter Board

目录

概述

FireBeetle(萤火虫),正如它的名字一样,小巧、轻盈,它是大自然的夜精灵,传递着信息,分享着我们创造的喜悦。FireBeetle系列产品,定位于低功耗物联网,旨在方便、快速的搭建物联网硬件平台。FireBeetle系列有三个大类,分别是Board(主板)、Covers(扩展)、Accessories(配件)。

FireBeetle Covers-Gravity Adapter Board扩展板,是FireBeetle与Gravity传感器的适配器,通过它,可以轻松的兼容Gravity接口传感器(支持V3.3)。模块工作电压3.3V,且支持电源电压控制。

性能描述

  • 输入电压VCC:3.7V~5.5V
  • 输出电压:3.3V
  • 支持低功耗:POWER_EN接低使3V3断电
  • 支持最大放电电流:600mA(LDO-3.3V电源输出)
  • 接口方式:Gravity标准接口
  • 支持数字输入输出:10
  • 支持模拟输入:5
  • 支持I2C
  • 支持UART
  • 支持SPI
  • 板子复位按钮
  • 尺寸:29.00×58.00mm
  • 硬件版本:V1.0


尺寸图

  • pin脚间距:2.54mm
  • 安装孔间距:24mm/53mm
  • 安装孔尺寸:3.1mm
  • 主板尺寸:29.00mm×58.00mm
  • 板厚:1.6mm
FireBeetle Covers-Gravity Adapter Board(V1.0)主板尺寸图

POWER使能

如下图所示,POWER_EN是电源使能引脚,高电平使能(默认使能)通路,当POWER_EN输入低电平时,模块3V3电压为0。

power使能端口

可以将POWER_EN连接到任意GPIO,FireBeetle主板可以通过GPIO控制模块的整体电源,以达到低功耗功能。

I2C使用

这里I2C使用的电源是3V3,因此要求连接的I2C设备需要支持3V3工作电压。测试采用的是BME280传感器,测试代码如下:

/*!
 * @file basicTestI2C.ino
 * @brief DFRobot's Temperature、Pressure、Humidity and Approx altitude
 * @n [Get the module here]
 * @n This example read the Temperature、Pressure、Humidity and Altitude from BME280, and then print them
 * @n [Connection and Diagram]
 *
 * @copyright  [DFRobot](http://www.dfrobot.com), 2016
 * @copyright GNU Lesser General Public License
 *
 * @author [yangyang]
 * @version  V1.0
 * @date  2017-7-5
 */

#include <DFRobot_BME280.h>

#define SEA_LEVEL_PRESSURE  1013.25f
#define BME_CS 10

DFRobot_BME280 bme; //I2C

float temp, pa, hum, alt;

void setup() {
    Serial.begin(115200);
    
    // I2c default address is 0x76, if the need to change please modify bme.begin(Addr)
    if (!bme.begin(0x77)) {
        Serial.println("No sensor device found, check line or address!");
        while (1);
    }
    
    Serial.println("-- BME280 DEMO --");
}


void loop() { 
  temp = bme.temperatureValue();
  pa = bme.pressureValue();
  hum = bme.humidityValue();
  alt = bme.altitudeValue(SEA_LEVEL_PRESSURE);
  
  Serial.print("Temp:");
  Serial.print(temp);
  Serial.println(" C");
  
  Serial.print("Pa:");
  Serial.print(pa);
  Serial.println(" Pa");
  
  Serial.print("Hum:");
  Serial.print(hum);
  Serial.println(" %");
  
  Serial.print("Alt:");
  Serial.print(alt);
  Serial.println(" m");
  
  Serial.println("------END------");
  
  delay(1000);
}

下载程序到Firebeetle主板(这里采用的是FireBeetle Board-ESP32),打印信息如下:

I2C调试信息

SPI使用

模块SPI接口与DF其他SPI接口传感器线序兼容,如下图所示,模块的SPI片选引脚(SS)通过4PIN拨码开关与D2、D3、D4、D5连接,方便使用。

SPI接口示意图

输入代码,并将片选引脚拨到D2(程序中是D2):

#include <Wire.h>
#include <DFRobot_BME280.h>

#define SEALEVELPRESSURE_HPA	1013.25
#define BME_CS D2

DFRobot_BME280 bme(BME_CS); //SPI

unsigned long delayTime;

void setup() {
    Serial.begin(115200);
    Serial.println(F("BME280 test"));

    bool status;
    
    status = bme.begin();//I2c default address is 0x77, if the need to change please modify bme.begin(Addr)
    if (!status) {
        Serial.println("Could not find a valid BME280 sensor, check wiring!");
        while (1);
    }
    
    Serial.println("-- Default Test --");
    delayTime = 1000;

    Serial.println();
}


void loop() { 
    printValues();
    delay(delayTime);
}


void printValues() {
    Serial.print("Temperature = ");
    Serial.print(bme.readTemperatureValue());
    Serial.println(" *C");

    Serial.print("Pressure = ");

    Serial.print(bme.readPressureValue() / 100.0F);
    Serial.println(" hPa");

    Serial.print("Approx Altitude = ");
    Serial.print(bme.readAltitudeValue(SEALEVELPRESSURE_HPA));
    Serial.println(" m");

    Serial.print("Humidity = ");
    Serial.print(bme.readHumidityValue());
    Serial.println(" %");

    Serial.println();
}

资料连接

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!

更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖。


更多


DFshopping car1.png DFRobot商城购买链接

个人工具
名字空间

变换
操作
导航
工具箱