STM32 DS18B20 Real-Time Temperature Reader
Budget: $30 – $250 USD
I’m integrating a DS18B20 temperature sensor into my STM32 board and need clean, lightweight C code that talks to the sensor over its native 1-Wire bus. I don’t want to rely on HAL or LL helpers—I’m after fully custom code that I can drop into an existing bare-metal project.
Scope
• Write and comment a small driver that handles sensor reset, ROM commands, temperature conversion, CRC check, and sign/decimal formatting.
• Provide a non-blocking polling routine that delivers continuous, real-time readings.
• Push each reading out over a simple interface of your choice (UART printf, SWO, or a function callback) so I can watch live values in a terminal or debugger.
• Supply a short README explaining pin assignments, timing considerations, and how to compile and call the API within STM32CubeIDE or a Makefile setup.
Acceptance
• Code builds with no warnings on GCC-ARM.
• A demo loop shows stable temperature updates every second (or faster) on my serial console.
• All 1-Wire timing meets datasheet specs without external libraries.
This is a focused task that should stay lean—no bloated frameworks, just concise, well-documented source files I can extend later.
Scope
• Write and comment a small driver that handles sensor reset, ROM commands, temperature conversion, CRC check, and sign/decimal formatting.
• Provide a non-blocking polling routine that delivers continuous, real-time readings.
• Push each reading out over a simple interface of your choice (UART printf, SWO, or a function callback) so I can watch live values in a terminal or debugger.
• Supply a short README explaining pin assignments, timing considerations, and how to compile and call the API within STM32CubeIDE or a Makefile setup.
Acceptance
• Code builds with no warnings on GCC-ARM.
• A demo loop shows stable temperature updates every second (or faster) on my serial console.
• All 1-Wire timing meets datasheet specs without external libraries.
This is a focused task that should stay lean—no bloated frameworks, just concise, well-documented source files I can extend later.
Related categories:
C Programming
Electronics
Microcontroller
C++ Programming
Debugging
Embedded Systems
STM32
API Development