Closed alexhorner closed 2 years ago
Hi @alexhorner , I think that the issue might be due to the constructor OneWire ds(28)
.
That particualr constructor is a shorthand for
OneWire ds;
...
void setup() {
...
ds.begin(28);
...
}
(see https://github.com/PaulStoffregen/OneWire/blob/master/OneWire.h#L73 )
Since the constructor gets called before the rtos is fully configured you'll get an error on pinMode()
(which internally calles malloc
).
Replacing the short version with the one with begin()
should do the trick!
Let me know if it works
Hi there,
I am trying to run an Arduino sketch which works fine on an ESP32 on my Pi Pico. The device unfortunately crashes when trying to do this.
The sketch contains the following code, and is intended to read Dallas iButton OneWire devices using the OneWire library found at https://www.pjrc.com/teensy/td_libs_OneWire.html by Paul Stoffregen, version 2.3.7
I have captured the output from GPIO0
Not sure what this means or where to take this. The error occurs immediately on start of the Pico, so no hardware should be required to reproduce this issue,
Thanks!