Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# STTS751
Arduino library to support the STTS751 digital temperature sensor

## API

This sensor uses I2C to communicate.
For I2C it is then required to create a TwoWire interface before accessing to the sensors:

dev_i2c = new TwoWire(I2C_SDA, I2C_SCL);
dev_i2c->begin();

An instance can be created and enbaled when the I2C bus is used following the procedure below:

Temp = new STTS751Sensor(dev_i2c);
Temp->Enable();

The access to the sensor values is done as explained below:

Read temperature.

Temp->GetTemperature(&temperature);

## Documentation

You can find the source files at
https://github.com/stm32duino/STTS751

The STTS751 datasheet is available at
https://www.st.com/content/st_com/en/products/mems-and-sensors/temperature-sensors/stts751.html
36 changes: 36 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#######################################
# Syntax Coloring Map For STTS751
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

STTS751Sensor KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

ReadID KEYWORD2
Enable KEYWORD2
Disable KEYWORD2
GetOutputDataRate KEYWORD2
SetOutputDataRate KEYWORD2
GetTemperature KEYWORD2
Get_DRDY_Status KEYWORD2
SetLowTemperatureThreshold KEYWORD2
SetHighTemperatureThreshold KEYWORD2
GetTemperatureLimitStatus KEYWORD2
SetEventPin KEYWORD2
Read_Reg KEYWORD2
Write_Reg KEYWORD2
Set_One_Shot KEYWORD2
Get_One_Shot_Status KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################

STTS751_OK LITERAL1
STTS751_ERROR LITERAL1
9 changes: 9 additions & 0 deletions library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name=STM32duino STTS751
version=1.0.0
author=SRA
maintainer=stm32duino
sentence=digital temperature sensor.
paragraph=This library provides Arduino support for the digital temperature sensor STTS751 for STM32 boards.
category=Sensors
url=https://github.com/stm32duino/STTS751
architectures=stm32, avr, sam
Loading