Add pio onewire example (#334)

* Adds PIO onewire example

Co-authored-by: martin <admin@crossleys.biz>
This commit is contained in:
mjcross
2023-03-26 22:48:23 +01:00
committed by GitHub
parent 56b4522ce4
commit 9a82398d82
12 changed files with 434 additions and 1 deletions

9
pio/onewire/ds18b20.h Normal file
View File

@@ -0,0 +1,9 @@
// Function commands for d218b20 1-Wire temperature sensor
// https://www.analog.com/en/products/ds18b20.html
//
#define DS18B20_CONVERT_T 0x44
#define DS18B20_WRITE_SCRATCHPAD 0x4e
#define DS18B20_READ_SCRATCHPAD 0xbe
#define DS18B20_COPY_SCRATCHPAD 0x48
#define DS18B20_RECALL_EE 0xb8
#define DS18B20_READ_POWER_SUPPLY 0xb4