I have added a debug, so I know that read_temp_co2 start and exchange_command start but it seems that exchange_command never ends.
Here is what I get in the serial monitor:
Soft WDT reset
ctx: cont
sp: 3ffffce0 end: 3fffffd0 offset: 01b0
>>>stack>>>
3ffffe90: 3ffefa24 000001f2 3ffffebd 00000028
3ffffea0: 3ffef768 00000008 3ffffeb0 402075bc <
3ffffeb0: 63786528 676e6168 6f635f65 6e616d6d
3ffffec0: 65202964 61686378 5f65676e 6d6d6f63
3ffffed0: 20646e61 0a646e65 3fff1400 401006a8
3ffffee0: 00335116 4bc6a7f0 00335116 00000000
3ffffef0: 00335116 00000000 00418937 00000000
3fffff00: 00000001 00000277 40106669 4bc6a7f0
3fffff10: 00000000 ff000000 3ffefa48 3fffff69
3fffff20: 000f3093 00000008 3fffff68 40208878
3fffff30: 3ffe89d8 3ffef768 3fffff7c 3ffef728
3fffff40: 3fffdad0 00000000 3ffef768 40202a9e
3fffff50: 1101a8c0 00ffffff 3ffefa48 40207a08
3fffff60: 008601ff 00000000 3ffefa79 40202934
3fffff70: 40208ac8 1101a8c0 00000000 00000000
3fffff80: 00000000 00000000 3ffefa48 40202848
3fffff90: 00000251 1101a8c0 3ffefa48 3ffefb20
3fffffa0: 3fffdad0 00000000 3ffefa48 3ffefb20
3fffffb0: 3fffdad0 00000000 3ffefb18 4020830c
3fffffc0: feefeffe feefeffe 3ffe85e8 40100739
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld
MHZ19 ESP reader