https://toitlang.org/ logo
On ESP32C3 I'm seeing issues with the default cons...
# general
a
On ESP32C3 I'm seeing issues with the default constructor
Ds18b20
construction chain i.e.
Ds18b20 -> ... ->  RmtProtocol
that deafaults to
--memory-blocks=4
The following snip reproduces the problem
Copy code
import gpio
import one-wire
import ds18b20 show Ds18b20

main:
  bus := one-wire.RmtProtocol (gpio.Pin 0) --pull-up=true --memory-blocks=4    // fails
  //bus := one-wire.RmtProtocol (gpio.Pin 0) --pull-up=true --memory-blocks=2  // works
Console report
Copy code
[jaguar] INFO: program b6dd04e5-fafe-bb0f-6fd0-022e82ef48bf started
E (1216037) rmt: rmt_rx_register_to_group(130): no free rx channels
E (1216037) rmt: rmt_new_rx_channel(224): register channel failed

******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.184>
******************************************************************************
EXCEPTION error. 
ALREADY_IN_USE
  0: rmt-channel-new_          <sdk>/rmt.toit:1202:3
  1: In                        <sdk>/rmt.toit:779:17
  2: RmtProtocol               <pkg:toit-1-wire>/one_wire.toit:554:19
  3: main                      foo-rmt.toit:6:10
******************************************************************************
This post lead me on the right track: https://www.reddit.com/r/esp32/comments/1cvzsxc/comment/l4uzrb4/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button > if you configure more than 48 mem block symbols the function allocating the hardware channels blocks two channels instead of one I can read the temperature using the
--memory-blocks=2