0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

【Renesas RA6M4開發(fā)板之I2C讀取BMP180氣壓溫度】

RT-Thread單片機(jī)學(xué)習(xí) ? 來(lái)源:RT-Thread單片機(jī)學(xué)習(xí) ? 作者:RT-Thread單片機(jī)學(xué)習(xí) ? 2023-01-16 09:29 ? 次閱讀

1.0 BMP180

在這里插入圖片描述

此圖轉(zhuǎn)載欽源盛數(shù)碼專營(yíng)店

本篇通過(guò)Renesas RA6M4開發(fā)板采用I2C讀取BMP180傳感器的氣壓溫度示例程序演示。

1.1 BMP180介紹

1、BMP180是一款高精度、小體積、低能耗的壓力傳感器,可以應(yīng)用在移動(dòng)設(shè)備中;

2、精度低,可以達(dá)到0.03hPa;

3、BMP180采用強(qiáng)大的8-pin陶瓷無(wú)引線芯片承載(LCC)超薄封裝,可以通過(guò)I2C總線直接與各種微處理器相連。

1.2 BMP180特點(diǎn)

1.壓力范圍:300---1100hPa(海拔9000米一500米)

2.電源電壓:5V

3.低功耗:在標(biāo)準(zhǔn)模式下5uA

4.高精度:低功耗模式下,分辨率為0.06hPa(0.5米)

5.高線性模式下,分辨率為0.03hPa(0.25米)

6.帶溫度輸出

7.I2C通信方式8.帶溫度補(bǔ)償

9.MSL1秒響應(yīng)

10.待機(jī)電流:0.1uA

11.需在氣體環(huán)境中工作,不可測(cè)量液體和反接電源

尺寸大小如下:

1.3 產(chǎn)品應(yīng)用1.GPS導(dǎo)航(航位推算,上下橋檢測(cè)等)

⒉.室內(nèi)室外導(dǎo)航

3.休閑、體育等監(jiān)測(cè)

4.天氣預(yù)報(bào)

5.垂直速度指示(上升/下沉速度)

  1. RT-theard配置 2.1 硬件需求1、需要BMP180采集氣體環(huán)境下的氣壓和溫度,I2C通訊接線 SDA—p503;SCL—p504 ,不需要關(guān)注地址后面庫(kù)自帶配置了,與ssd1306不同

實(shí)現(xiàn)功能:

I2C讀取BMP180傳感器的氣壓溫度

2、RA6M4開發(fā)板

3、USB下載線,ch340串口和附帶6根母母線, rx—p613;tx—p614

2.2 軟件配置Renesas RA6M4開發(fā)板環(huán)境配置參照:【基于 RT-Thread Studio的CPK-RA6M4 開發(fā)板環(huán)境搭建】

1、新建項(xiàng)目RA6M4-bmp180工程

2、點(diǎn)擊RT-theard Setting,在軟件包下添加軟件包,然后搜索bmp相關(guān)軟件支持包,點(diǎn)擊添加即可,然后出現(xiàn)對(duì)應(yīng)包。

3、配置ssd306,右鍵選擇配置項(xiàng)

4、在軟件包中開啟示例程序。

5、在硬件中,啟動(dòng)I2C,設(shè)置端口SDA—p503;SCL—p504

6、全部保存剛剛的配置,更新當(dāng)前配置文件

保存完是灰色,沒(méi)有保存是藍(lán)色。

  1. 代碼分析1、剛剛加載軟件包在packages文件夾下,bmp180.c和bmp180_sample.c示例代碼更改為如下
    (或者頭文件添加#include "bsp_api.h",否則會(huì)報(bào)錯(cuò)unitx_t,根據(jù)提示全部改為rt_unitx_t也OK,下面是第二種方法)
    bmp180.c
/* * Copyright (c) 2020 panrui 
   
 
#include 
    
#include 
    
#include 
    
#include "sensor.h"
#include "bmp180.h"

#define PKG_USING_BMP180

#ifdef PKG_USING_BMP180

#define BMP180_ADDR 0x77 /* i2c slave address */

#define BMP_REG_CHIP_ID 0xD0 
#define BMP_REG_RESET 0xE0
#define BMP_REG_CTRL_ADDR 0xF4
#define BMP_REG_AD_MSB 0xF6
#define BMP_REG_AD_LSB 0xF7
#define BMP_REG_AD_XLSB 0xF8
#define BMS_CAL_AC1 0xAA

#define BMP_REG_CTRL_TEMP 0x2E
#define BMP_REG_CTRL_POSS0 0x34
#define BMP_REG_CTRL_POSS1 0x74
#define BMP_REG_CTRL_POSS2 0xB4
#define BMP_REG_CTRL_POSS3 0xF4
#define BMP_REG_RESET_VALUE 0xB6
		
#define BMP180_I2C_BUS "i2c1" /* i2c linked */
#define BMP180_DEVICE_NAME "bmp180" /* register device name */


/* bmp clalc param */
struct bmp180_calc
{
   
	short ac1;
	short ac2;
	short ac3;
	short b1;
	short b2;
	short mb;
	short mc;
	short md;
	unsigned short ac4;
	unsigned short ac5;
	unsigned short ac6;	
};

/* bmp180 private data */
struct bmp180_dev
{
   
	struct bmp180_calc calc_param;
	struct rt_i2c_bus_device *i2c_bus;	/* linked i2c bus */
};

static rt_err_t  bmp180_read_regs(rt_sensor_t psensor, rt_uint8_t reg, rt_uint8_t *data, rt_uint8_t data_size)
{
   
    struct rt_i2c_msg msg[2];
	struct bmp180_dev *dev = RT_NULL;
	struct rt_i2c_bus_device *i2c_bus = RT_NULL;
	rt_uint32_t slave_addr = 0;
	
	slave_addr = (rt_uint32_t)psensor->config.intf.user_data;	/* get i2c slave address */
	dev = (struct bmp180_dev*)psensor->parent.user_data;/* bmp180 private data */
	i2c_bus = (struct rt_i2c_bus_device*)dev->i2c_bus; /* get i2c bus device */
	
    msg[0].addr  = (rt_uint8_t)slave_addr;
    msg[0].flags = RT_I2C_WR;
    msg[0].len   = 1;
    msg[0].buf   = ®
    msg[1].addr  = (rt_uint8_t)slave_addr;
    msg[1].flags = RT_I2C_RD;
    msg[1].len   = data_size;
    msg[1].buf   = data;

    if(rt_i2c_transfer(i2c_bus, msg, 2) == 2)
	{
   
        return RT_EOK;
    }
    else
    {
   
	  	LOG_E("i2c bus read failed!
");
        return -RT_ERROR;
    }
}

static rt_err_t  bmp180_write_regs(rt_sensor_t psensor, rt_uint8_t reg, rt_uint8_t *data, rt_uint8_t data_size)
{
   
    struct rt_i2c_msg msg[2];
	struct bmp180_dev *dev = RT_NULL;
	struct rt_i2c_bus_device *i2c_bus;
	rt_uint32_t slave_addr = 0;

	slave_addr = (rt_uint32_t)psensor->config.intf.user_data;
	dev = (struct bmp180_dev*)psensor->parent.user_data;
	i2c_bus = (struct rt_i2c_bus_device*)dev->i2c_bus;  
	
    msg[0].addr		= (rt_uint8_t)slave_addr;
    msg[0].flags	= RT_I2C_WR;
    msg[0].len   	= 1;
    msg[0].buf   	= ®
    msg[1].addr  	= (rt_uint8_t)slave_addr;
    msg[1].flags	= RT_I2C_WR | RT_I2C_NO_START;
    msg[1].len   	= data_size;
    msg[1].buf   	= data;
    if(rt_i2c_transfer(i2c_bus, msg, 2) == 2)
	{
   
        return RT_EOK;
    }
    else
    {
   
	  	LOG_E("i2c bus write failed!
");
        return -RT_ERROR;
    }
}

static rt_err_t bmp180_write_reg(rt_sensor_t psensor, rt_uint8_t reg, rt_uint8_t data)
{
   
	return bmp180_write_regs(psensor, reg, &data, 1);
}

static long bmp180_read_ut(rt_sensor_t psensor)
{
   
    rt_uint8_t buf[2] = {
   0};
	long   data = 0;
	
	bmp180_write_reg(psensor, BMP_REG_CTRL_ADDR, BMP_REG_CTRL_TEMP);
	rt_thread_delay(1);	/* max conversion time: 4.5ms */
	bmp180_read_regs(psensor, BMP_REG_AD_MSB, buf, 2);
	data = (buf[0]<<8) | buf[1];
	
	return data;
}

static long bmp180_read_up(rt_sensor_t psensor)
{
   
    rt_uint8_t buf[2] = {
   0};
	long   data = 0;
	
	bmp180_write_reg(psensor, BMP_REG_CTRL_ADDR, BMP_REG_CTRL_POSS0);
	rt_thread_delay(1);	/* max conversion time: 4.5ms */
	bmp180_read_regs(psensor, BMP_REG_AD_MSB, buf, 2);
	data = (buf[0]<<8) | buf[1];
	
	return data;
}

static rt_size_t bmp180_polling_get_data(rt_sensor_t psensor, struct rt_sensor_data *sensor_data)
{
   
	long x1, x2, b5, b6, x3, b3, p;
	unsigned long b4, b7;
	short temperature=0;
	long ut,up,pressure=0;
	struct bmp180_dev *dev = RT_NULL;
	struct bmp180_calc *param = RT_NULL;
	
	ut = bmp180_read_ut(psensor);
	up = bmp180_read_up(psensor);
	
	
	dev = (struct bmp180_dev*)psensor->parent.user_data;/* bmp180 private data */
	param = &dev->calc_param;	/* get calc param */
	
	/* temperature calc */
	x1 = (((long)ut - (long)param->ac6)*(long)param->ac5) >> 15;
  	x2 = ((long)param->mc << 11) / (x1 + param->md);
  	b5 = x1 + x2;
  	temperature = ((b5 + 8) >> 4);

	/* pressure calc */
	b6 = b5 - 4000;
	x1 = (param->b2 * (b6 * b6)>>12)>>11;
	x2 = (param->ac2 * b6)>>11;
	x3 = x1 + x2;
	b3 = (((((long)param->ac1)*4 + x3)<<0) + 2)>>2;
	
	x1 = (param->ac3 * b6)>>13;
	x2 = (param->b1 * ((b6 * b6)>>12))>>16;
	x3 = ((x1 + x2) + 2)>>2;
	b4 = (param->ac4 * (unsigned long)(x3 + 32768))>>15;
	b7 = ((unsigned long)(up - b3) * (50000>>0));
	if (b7 < 0x80000000)
	{
   
		p = (b7<<1)/b4;
	}
	else
	{
   
		p = (b7/b4)<<1;
	}
	x1 = (p>>8) * (p>>8);
	x1 = (x1 * 3038)>>16;
	x2 = (-7357 * p)>>16;
	pressure = p+((x1 + x2 + 3791)>>4);	
	
	if(psensor->info.type == RT_SENSOR_CLASS_BARO)
	{
   /* actual barometric */
	  	sensor_data->type = RT_SENSOR_CLASS_BARO;
		sensor_data->data.baro = pressure;
		sensor_data->timestamp = rt_sensor_get_ts();
	}
	else if(psensor->info.type == RT_SENSOR_CLASS_TEMP)
	{
   /* actual temperature */
		sensor_data->type = RT_SENSOR_CLASS_TEMP;
		sensor_data->data.temp = temperature;
		sensor_data->timestamp = rt_sensor_get_ts();
	}
	else
	{
   
		return 0;
	}
	
    return 1;
}

static rt_size_t bmp180_fetch_data(struct rt_sensor_device *psensor, void *buf, rt_size_t len)
{
   
    RT_ASSERT(buf);
	RT_ASSERT(psensor);
	
	//if(psensor->parent.open_flag & RT_DEVICE_FLAG_RDONLY)
	if(psensor->config.mode == RT_SENSOR_MODE_POLLING)
	{
   
        return bmp180_polling_get_data(psensor, buf);
    }

    return 0;
}

static rt_err_t bmp180_control(struct rt_sensor_device *psensor, int cmd, void *args)
{
   
	rt_err_t	ret = RT_EOK;
    rt_uint8_t 	*chip_id;
	
    RT_ASSERT(psensor);

    switch (cmd)
    {
   
    	/* read bmp180 id */
        case RT_SENSOR_CTRL_GET_ID:
		  	chip_id = (rt_uint8_t*)args;
	       	ret = bmp180_read_regs(psensor, BMP_REG_CHIP_ID, chip_id, 1);
        break;

        default:
        break;
	}
    return ret;
}

static struct rt_sensor_ops bmp180_ops =
{
   
    bmp180_fetch_data,
    bmp180_control,
};

int rt_hw_bmp180_init(const char *name, struct rt_sensor_config *cfg)
{
   
  	rt_err_t ret = RT_EOK;
	rt_sensor_t sensor_baro = RT_NULL, sensor_temp = RT_NULL;
    struct rt_sensor_module *module = RT_NULL;
	struct bmp180_dev 		*bmp180 = RT_NULL;
	rt_uint8_t bmbuf[22] = {
   0};
	
	bmp180 = rt_calloc(1, sizeof(struct bmp180_dev));
	if(bmp180 == RT_NULL)
	{
   
	  	LOG_E("malloc memory failed
");
		ret = -RT_ERROR;
		goto __exit;
	}
	
    bmp180->i2c_bus = rt_i2c_bus_device_find(cfg->intf.dev_name);
    if(bmp180->i2c_bus == RT_NULL)
    {
   
        LOG_E("i2c bus device %s not found!
", cfg->intf.dev_name);
		ret = -RT_ERROR;
		goto __exit;
    }	
	
	module = rt_calloc(1, sizeof(struct rt_sensor_device));
    if(module == RT_NULL)
	{
   
	  	LOG_E("malloc memory failed
");
	  	ret = -RT_ERROR;
		goto __exit;
	}
	module->sen[0] = sensor_baro;
    module->sen[1] = sensor_temp;
    module->sen_num = 2;
	
	/* barometric pressure sensor register */
    {
   
        sensor_baro = rt_calloc(1, sizeof(struct rt_sensor_device));
        if (sensor_baro == RT_NULL)
		{
   
		  	goto __exit;
		}
		rt_memset(sensor_baro, 0x0, sizeof(struct rt_sensor_device));
        sensor_baro->info.type       = RT_SENSOR_CLASS_BARO;
        sensor_baro->info.vendor     = RT_SENSOR_VENDOR_BOSCH;
        sensor_baro->info.model      = "bmp180_baro";
        sensor_baro->info.unit       = RT_SENSOR_UNIT_PA;
        sensor_baro->info.intf_type  = RT_SENSOR_INTF_I2C;
        sensor_baro->info.range_max  = 110000;	/* 1Pa */
        sensor_baro->info.range_min  = 30000;
        sensor_baro->info.period_min = 100;	/* read ten times in 1 second */

        rt_memcpy(&sensor_baro->config, cfg, sizeof(struct rt_sensor_config));
        sensor_baro->ops = &bmp180_ops;
        sensor_baro->module = module;
        
        ret = rt_hw_sensor_register(sensor_baro, name, RT_DEVICE_FLAG_RDWR, (void*)bmp180);
        if (ret != RT_EOK)
        {
   
            LOG_E("device register err code: %d", ret);
            goto __exit;
        }
    }
    /* temperature sensor register */
    {
   
        sensor_temp = rt_calloc(1, sizeof(struct rt_sensor_device));
        if (sensor_temp == RT_NULL)
		{
   
			goto __exit;
		}
		rt_memset(sensor_temp, 0x0, sizeof(struct rt_sensor_device));
        sensor_temp->info.type       = RT_SENSOR_CLASS_TEMP;
        sensor_temp->info.vendor     = RT_SENSOR_VENDOR_BOSCH;
        sensor_temp->info.model      = "bmp180_temp";
        sensor_temp->info.unit       = RT_SENSOR_UNIT_DCELSIUS;
        sensor_temp->info.intf_type  = RT_SENSOR_INTF_I2C;
        sensor_baro->info.range_max  = 850;	/* 0.1C */
        sensor_baro->info.range_min  = -400;
        sensor_temp->info.period_min = 100;	/* read ten times in 1 second */

        rt_memcpy(&sensor_temp->config, cfg, sizeof(struct rt_sensor_config));
        sensor_temp->ops = &bmp180_ops;
        sensor_temp->module = module;
        
        ret = rt_hw_sensor_register(sensor_temp, name, RT_DEVICE_FLAG_RDWR, (void*)bmp180);
        if (ret != RT_EOK)
        {
   
            LOG_E("device register err code: %d", ret);
            goto __exit;
        }
    }
   
	/* bmp180 read calc param */
	ret = bmp180_read_regs(sensor_baro, BMS_CAL_AC1, bmbuf, 22);
	if(ret == RT_EOK)
	{
   
		bmp180->calc_param.ac1 = (bmbuf[0]<<8)|bmbuf[1];
		bmp180->calc_param.ac2 = (bmbuf[2]<<8)|bmbuf[3];
		bmp180->calc_param.ac3 = (bmbuf[4]<<8)|bmbuf[5];
		bmp180->calc_param.ac4 = (bmbuf[6]<<8)|bmbuf[7];
		bmp180->calc_param.ac5 = (bmbuf[8]<<8)|bmbuf[9];
		bmp180->calc_param.ac6 = (bmbuf[10]<<8)|bmbuf[11];
		bmp180->calc_param.b1 = (bmbuf[12]<<8)|bmbuf[13];
		bmp180->calc_param.b2 = (bmbuf[14]<<8)|bmbuf[15];
		bmp180->calc_param.mb = (bmbuf[16]<<8)|bmbuf[17];
		bmp180->calc_param.mc = (bmbuf[18]<<8)|bmbuf[19];
		bmp180->calc_param.md = (bmbuf[20]<<8)|bmbuf[21];
	}
	else
	{
   
		LOG_E("bmp180 read calc param failed
");
		goto __exit;
	}
    return RT_EOK;

__exit:
  	if(sensor_baro)
	{
   
		rt_free(sensor_baro);
	}
	
	if(sensor_temp)
	{
   
		rt_free(sensor_temp);
	}
	
    if(module)
	{
   
	 	rt_free(module);
	}
	
	if (bmp180)
	{
   
		rt_free(bmp180);
	}
    return ret;
}

#endif /* PKG_USING_BMP180 */

bmp180_sample.c

/* * Copyright (c) 2020 panrui 
   

#include 
    
#include 
    
#include "sensor.h"
#include "bmp180.h"

static void read_baro_entry(void *parameter)
{
   
    rt_device_t baro_dev = RT_NULL, temp_dev = RT_NULL;
    struct rt_sensor_data baro_data,temp_data;
    rt_size_t res0 = 0, res1 = 1;
	rt_uint8_t chip_id;
	
    baro_dev = rt_device_find("baro_bmp180");
    if (baro_dev == RT_NULL)
    {
   
	  	 rt_kprintf("not found baro_bmp180 device
");
        return;
    }

    if (rt_device_open(baro_dev, RT_DEVICE_FLAG_RDONLY) != RT_EOK)
    {
   
        rt_kprintf("open baro_180 failed
");
        return;
    }

	temp_dev = rt_device_find("temp_bmp180");
    if (temp_dev == RT_NULL)
    {
   
	  	 rt_kprintf("not found temp_bmp180 device
");
        return;
    }

    if (rt_device_open(temp_dev, RT_DEVICE_FLAG_RDONLY) != RT_EOK)
    {
   
        rt_kprintf("open temp_bmp180 failed
");
        return;
    }
	
	rt_device_control(baro_dev, RT_SENSOR_CTRL_SET_ODR, (void *)(1));/* 1Hz read */
    rt_device_control(temp_dev, RT_SENSOR_CTRL_SET_ODR, (void *)(1));/* 1Hz read */
	
	rt_device_control(temp_dev, RT_SENSOR_CTRL_GET_ID, (void*)&chip_id);
	rt_kprintf("bmp180 chip ID [0x%X]
", chip_id);
	while (1)
    {
   
        res0 = rt_device_read(baro_dev, 0, &baro_data, 1);
		res0 = rt_device_read(temp_dev, 0, &temp_data, 1);
        if (res0==0 || res1==0)
        {
   
            rt_kprintf("read data failed! result is %d,%d
", res0, res1);
            rt_device_close(baro_dev);
			rt_device_close(temp_dev);
            return;
        }
        else
        {
   
        	rt_kprintf("baro[%dPa],temp[%d.%dC],timestamp[%d]
", baro_data.data.baro, 
					   temp_data.data.temp/10-42, temp_data.data.temp%10,
					   temp_data.timestamp);
        }

        rt_thread_delay(500);
    }
}

static int baro_read_sample(void)
{
   
    rt_thread_t baro_thread;

    baro_thread = rt_thread_create("baro_r",
                                     read_baro_entry,
                                     RT_NULL,
                                     1024,
                                     RT_THREAD_PRIORITY_MAX / 2,
                                     20);
    if (baro_thread != RT_NULL)
    {
   
        rt_thread_startup(baro_thread);
    }

    return RT_EOK;
}
INIT_APP_EXPORT(baro_read_sample);

static int rt_hw_bmp180_port(void)
{
   
    struct rt_sensor_config cfg;
    	
	cfg.intf.dev_name = "i2c1"; 		/* i2c bus */
    cfg.intf.user_data = (void *)0x77;	/* i2c slave addr */
    rt_hw_bmp180_init("bmp180", &cfg);	/* bmp180 */

    return RT_EOK;
}
INIT_COMPONENT_EXPORT(rt_hw_bmp180_port);

2、此庫(kù)包含讀取I2C信息,解調(diào),并且添加一個(gè)進(jìn)程、每秒自動(dòng)打印溫度和氣壓以及時(shí)間。

關(guān)鍵打印代碼以及自行校準(zhǔn)兩項(xiàng)參數(shù)

rt_kprintf("baro[%dPa],temp[%d.%dC],timestamp[%d]
", baro_data.data.baro, 
					   temp_data.data.temp/10-42, temp_data.data.temp%10,
					   temp_data.timestamp);

3、main.c文件在re_gen文件夾下,主程序圍繞“hal_entry();”函數(shù)(在src文件夾),這些默認(rèn)不變

  1. 下載驗(yàn)證1、編譯重構(gòu)

編譯成功

2、下載程序

下載成功

3、CMD串口調(diào)試

然后板載復(fù)位,開始串口打印顯示!

效果如下

這樣我們就可以天馬行空啦!
審核編輯:湯梓紅

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問(wèn)題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • I2C
    I2C
    +關(guān)注

    關(guān)注

    28

    文章

    1487

    瀏覽量

    123753
  • Renesas
    +關(guān)注

    關(guān)注

    0

    文章

    1757

    瀏覽量

    22756
  • 開發(fā)板
    +關(guān)注

    關(guān)注

    25

    文章

    5050

    瀏覽量

    97468
  • RA6M4
    +關(guān)注

    關(guān)注

    0

    文章

    51

    瀏覽量

    450
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    Renesas RA6M4開發(fā)板I2C(模擬)驅(qū)動(dòng)ssd1306 OLED屏幕】

    Renesas RA6M4開發(fā)板I2C(模擬)驅(qū)動(dòng)ssd1306 OLED屏幕】
    的頭像 發(fā)表于 01-11 09:34 ?4551次閱讀
    【<b class='flag-5'>Renesas</b> <b class='flag-5'>RA6M4</b><b class='flag-5'>開發(fā)板</b><b class='flag-5'>之</b><b class='flag-5'>I2C</b>(模擬)驅(qū)動(dòng)ssd1306 OLED屏幕】

    [MicroPython]STM32F407開發(fā)板控制BMP180測(cè)量氣壓

    ` 1.實(shí)驗(yàn)?zāi)康?1. 學(xué)習(xí)在PC機(jī)系統(tǒng)中擴(kuò)展簡(jiǎn)單I/O 接口的方法。 2. 學(xué)習(xí)BMP180測(cè)量氣壓的方法。 3. 學(xué)習(xí)F407 Micropython
    發(fā)表于 08-09 14:34

    如何使用I2C來(lái)控制BMP180壓強(qiáng)傳感器?

      今天我們繼續(xù)使用I2C來(lái)控制BMP180壓強(qiáng)傳感器。BMP180壓強(qiáng)傳感器操作原理比較簡(jiǎn)單,開機(jī)先通過(guò)I2C讀取出AC1,AC
    發(fā)表于 11-05 06:05

    BMP180的相關(guān)資料分享

    bmp180氣壓傳感器前言一、bmp180氣壓傳感器外觀二、原理圖三、相關(guān)參數(shù)講解1.引腳2.溫度
    發(fā)表于 01-21 08:19

    通過(guò)Renesas RA6M4開發(fā)板采用I2C讀取BMP180傳感器的氣壓溫度示例程序

    功能:I2C讀取BMP180傳感器的氣壓溫度2、RA6M4
    發(fā)表于 07-19 10:40

    定制BMP180 傳感器的教程

    I2C 時(shí)鐘(模擬 5),將 SDA 連接到 I2C 數(shù)據(jù)(模擬 4)。然后下載我們的 BMP085/BMP180 Arduino 庫(kù)和
    發(fā)表于 07-21 07:05

    Renesas RA2L1開發(fā)板I2C測(cè)評(píng)

    1、Renesas RA2L1開發(fā)板I2C  開發(fā)板介紹  CPK-
    發(fā)表于 10-24 16:29

    Renesas RA2L1開發(fā)板I2C接口評(píng)測(cè)

    1、Renesas RA2L1 開發(fā)板 I2C  開發(fā)板介紹  CPK-
    發(fā)表于 11-04 14:26

    Renesas RA6M4開發(fā)板USB-H評(píng)測(cè)活動(dòng)

    1、Renesas RA6M4開發(fā)板USB-H評(píng)測(cè)  這次是第二次接觸這塊開發(fā)板了,但是還是第一次仔細(xì)觀察這塊
    發(fā)表于 11-22 16:08

    NK-980IOT開發(fā)板I2C讀取BMP180測(cè)試步驟

    開發(fā)環(huán)境軟件:RT-Thread Studio硬件:NK-980IOT開發(fā)板I2C介紹I2C是一種雙線、雙向串行總線,為設(shè)備之間的數(shù)據(jù)交換提供了一種簡(jiǎn)單有效的方法。
    發(fā)表于 12-05 14:31

    BMP180

    BMP180數(shù)字壓力傳感器,BMP180由一個(gè)壓阻傳感器,模擬 - 數(shù)字轉(zhuǎn)換器,并與E2PROM一個(gè)控制單元和一個(gè)串行I2C接口。該BMP180
    發(fā)表于 05-04 11:09 ?78次下載

    開發(fā)板評(píng)測(cè)】Renesas RA6M4開發(fā)板CAN

    介紹 通過(guò)閱讀用戶手冊(cè),我們可以了解到RA6M4 MCU具有豐富的外設(shè)如IIC、SPI、CAN、USB等(如下圖)。在此次測(cè)評(píng)中我們暫且只關(guān)心CAN的使用。 國(guó)際慣例先看說(shuō)明書,打開《開發(fā)板用戶手冊(cè)》認(rèn)真研讀,通篇看完沒(méi)有關(guān)于CAN總線的介紹,很明顯此
    的頭像 發(fā)表于 12-20 12:10 ?1487次閱讀

    開發(fā)板評(píng)測(cè)】Renesas RA6M4開發(fā)板SDIO(SDHI)

    本次評(píng)測(cè)的開發(fā)板Renesas的CPK-RA6M4開發(fā)板,它是一款Renesas官方基于RA6M4
    的頭像 發(fā)表于 12-27 13:15 ?2504次閱讀

    Renesas RA6M4開發(fā)板I2C讀取mpu6050】

    本篇通過(guò)Renesas RA6M4開發(fā)板采用I2C讀取mpu6050傳感器的角加速度,角速度和溫度
    的頭像 發(fā)表于 01-17 09:07 ?7744次閱讀
    【<b class='flag-5'>Renesas</b> <b class='flag-5'>RA6M4</b><b class='flag-5'>開發(fā)板</b><b class='flag-5'>之</b><b class='flag-5'>I2C</b><b class='flag-5'>讀取</b>mpu6050】

    Renesas RA6M4開發(fā)板DHT11溫濕度讀取

    本篇通過(guò)Renesas RA6M4開發(fā)板DHT11溫濕度讀取示例程序演示。
    的頭像 發(fā)表于 01-18 17:18 ?1688次閱讀
    【<b class='flag-5'>Renesas</b> <b class='flag-5'>RA6M4</b><b class='flag-5'>開發(fā)板</b><b class='flag-5'>之</b>DHT11溫濕度<b class='flag-5'>讀取</b>】