
#第三届立创大赛#微型体测仪
简介
本项目意在设计一种基于云平台的身体参数测试系统,利用脉搏传感器、红外传感器、微弱信号检测电路等实现人体参数的采集,数据通过无线网方式上传云端存储,并提供网页端交互界面,为用户构建一种人体参数管理平台。
简介:本项目意在设计一种基于云平台的身体参数测试系统,利用脉搏传感器、红外传感器、微弱信号检测电路等实现人体参数的采集,数据通过无线网方式上传云端存储,并提供网页端交互界面,为用户构建一种人体参数管理平台。开源协议
:BSD
描述
1. 参赛者姓名:Mark
2. 参赛作品的名字:微型体测仪
3. 拟用到的立创商城在售物料:ESP8266、STM32、PL2303、LCD12864、LM1117等
4. 拟用到的非立创商城物料或其它补充:电阻电容等小元件
5. 拟用到的EDA工具软件名称(必填项):立创EDA / EasyEDA
6. 原文链接:http://club.szlcsc.com/article/details_16043_1.html
7. 原工程链接:https://oshwhub.com/markone/hehe
一、作品简介
![]() |
![]() |
二、系统构架图



三、硬件部分的描述
设计软件:立创EDA
设计链接:https://lceda.cn/markone/hehe
原理图:
PCB:



四、材料清单(BOM列表):

五、软件部分的描述







参数 |
描述 |
device |
SPI设备句柄 |
name |
SPI设备名称 |
bus_name |
SPI总线名称 |
user_data |
用户数据指针 |
static int rt_hw_ssd1306_config(void) { rt_err_t res; /* oled use PC8 as CS */ spi_cs.pin = CS_PIN; rt_pin_mode(spi_cs.pin, PIN_MODE_OUTPUT); /* 设置片选管脚模式为输出 */ res=rt_spi_bus_attach_device(&spi_dev_ssd1306,SPI_SSD1306_DEVICE_NAME, SPI_BUS_NAME,(void*)&spi_cs); if (res != RT_EOK) { OLED_TRACE("rt_spi_bus_attach_device!\r\n"); return res; } } |
参数 |
描述 |
device |
SPI设备句柄 |
cfg |
SPI传输配置参数指针 |
static int rt_hw_ssd1306_config(void) { /* config spi */ { struct rt_spi_configuration cfg; cfg.data_width = 8; cfg.mode = RT_SPI_MASTER | RT_SPI_MODE_0 | RT_SPI_MSB; cfg.max_hz = 20 * 1000 *1000; /* 20M,SPI max 42MHz,ssd1306 4-wire spi */ rt_spi_configure(&spi_dev_ssd1306, &cfg); } |
ssd1306_write_data(start_address); // Default => 0x00 (Start Address) ssd1306_write_data(end_address); // Default => 0x7F (End Address) } void set_row_address(rt_uint8_t start_address, rt_uint8_t end_address) { ssd1306_write_data(start_address); // Default => 0x00 (Start Address) ssd1306_write_data(end_address); // Default => 0x7F (End Address) } |
static void RCC_Configuration(void); static void GPIO_Configuration(void); static void NVIC_Configuration(struct stm32_uart *uart); void rt_hw_usart_init(); |
|
/* polling mode */
if (dev->flag & RT_DEVICE_FLAG_STREAM)
{
/* stream mode */
while (size)
{
if (*ptr == '\n')
{
while (!(uart->uart_device->SR & USART_FLAG_TXE));
uart->uart_device->DR = '\r';
/* interrupt mode Tx, does not support */
RT_ASSERT(0);
} while (!(uart->uart_device->SR & USART_FLAG_TXE));
uart->uart_device->DR = (*ptr & 0x1FF); ++ptr; --size;
}
}
else
{
/* write data directly */
while (size)
{
while (!(uart->uart_device->SR & USART_FLAG_TXE));
uart->uart_device->DR = (*ptr & 0x1FF); ++ptr; --size;
}
}
|
rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t flag, struct stm32_serial_device *serial)
{
RT_ASSERT(device != RT_NULL); if ((flag & RT_DEVICE_FLAG_DMA_RX) ||
(flag & RT_DEVICE_FLAG_INT_TX))
{
RT_ASSERT(0);
} device->type = RT_Device_Class_Char;
device->rx_indicate = RT_NULL;
device->tx_complete = RT_NULL;
device->init = rt_serial_init;
device->open = rt_serial_open;
device->close = rt_serial_close;
device->read = rt_serial_read;
device->write = rt_serial_write;
device->control = rt_serial_control;
device->user_data = serial; /* register a character device */
return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag);
}
|
六、作品演示
七、总结
更多项目详情见链接:http://club.szlcsc.com/article/details_16043_1.html
本项目归立创社区“MarkOne”所有
设计图
BOM
ID | Name | Designator | Footprint | Quantity |
---|---|---|---|---|
1 | 103 | C1 | 0603 | 1 |
2 | KEY | KEY1,KEY4 | LITTLEBEIBEI | 2 |
3 | SW-SPDT | S1 | 2.5MM UP | 1 |
4 | 10K | R1,R4,R10 | 0603 | 3 |
5 | XTAL | 8M | XTAL1 | 1 |

评论