Closed DanteNahuel closed 6 years ago
Thanks. There isn't really a step-by-step unfortunately (and no video) however app_main.c
does contain all the steps you need, but I concede that it's not obvious. I can give you some pointers if you tell me how many sensors you plan to use (i.e. one vs more than one).
Thank you very much for the answer. I'm trying to understand app_main.c but, since it has all examples at the same time i'm a bit confused with it. i'm planing to use 4 sensors at the same time.
Ok, quickly (I can answer specific questions if you're not sure about any of these steps):
owb_rmt_initialize
) and then decide if you want to enable CRC mode (I recommend it, then you can see if you get any bus errors).owb_search_first
to find the first device, and then calling owb_search_next
until found
is false. For each device, you can extract the ROM code (ID) as a string with owb_string_from_rom_code
and store it. Remember how many devices you saw.DS18B20_Info
instance for each device. Loop through the number of devices, and for each one call ds18b20_malloc
and then ds18b20_init
. You can also turn on CRC for the device itself (ds18b20_use_crc
), and set the resolution (ds18b20_set_resolution
).ds18b20_convert_all
. Then you have to wait a bit for the conversion to complete (ds18b20_wait_for_conversion
)ds18b20_read_temp
.ds18b20_free
for each DS18B20_Info instance that you malloc'd, and call owb_free
.Also look here: https://davidantliff.github.io/esp32-ds18b20/index.html
At the risk of being more confusing, you can see an app where I used this library here: https://github.com/DavidAntliff/esp32-poolmon/blob/master/main/sensor_temp.c
See how you go with that, and if you're still stuck let me know and I'll help if I can.
Thank you a lot! I'll try to do as you explained! If you don't mind, can we leave this open until it works?
@DanteNahuel did you have any success? Can I close this issue?
@DavidAntliff Sorry, I had a couple of personal issues and I forgot to close this. Thank you for your help.
Hi there. Incredible library. Is there any documentation with a step by step or youtube video using this library? Noob asking.