https://github.com/nimaltd/max31865
MAX31865 Library
- http://www.github.com/NimaLTD
- https://www.instagram.com/github.nimaltd/
- https://www.youtube.com/@nimaltd
This is the MAX31865 STM32 HAL Library
Based on https://github.com/adafruit/Adafruit_MAX31865
How to use this Library:
- Select “General peripheral Initalizion as a pair of ‘.c/.h’ file per peripheral” on project settings.
- Enable SPI and set clock below 2MHz,MSB,CPOL LOW,CPHA 2 Edge.
- Enable a gpio as Output for CS Pin.
- Include Header and source into your project.
- Config “Max31865Conf.h”.
- Call Max31865_Init( .. .. .. ).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#include "Max31865.h" Max31865_t pt100; bool pt100isOK; float pt100Temp; int main() { Max31865_init(&pt100,&hspi3,SENSOR_CS1_GPIO_Port,SENSOR_CS1_Pin,4,50); while(1) { float t; pt100isOK = Max31865_readTempC(&pt100,&t); pt100Temp = Max31865_Filter(t,pt100Temp,0.1); // << For Smoothing data HAL_Delay(1000); } } |
https://www.adafruit.com/products/3328