ESP32 - Onewire library #6885
Replies: 1 comment
-
Posted at 2016-11-28 by Wilberforce https://github.com/espruino/Espruino/blob/master/src/jswrap_onewire.c#L75 There is a delay here: Posted at 2016-11-28 by @gfwilliams Personally I'd say you probably want to put a logic analyser on it and compare with a board that does it properly. The OneWire library itself should be pretty good now (i mean, it's worked fine on pretty much every architecture) and the only external things it uses are:
You found the first two, so if they work fine then about the only thing it could be is IRQs jumping in and causing problems. Of course if it's like the ESP8266 then it actually 'caches' flash data in RAM and executes from that. If the OneWire + GPIO + delay code isn't in the correct section, it may end up having to be loaded on demand, which would mess up the timings. Posted at 2016-11-28 by Wilberforce Thanks @gfwilliams Ok. Maybe time to justify/invest in a logic analyser! Any recommendations? (cheap) Using a poorman's Led on the signal line, I can see it glowing dimly. The disable/enable interrupts are just stubs at the moment, as the espruino was pinned to a core I was wondering if that was not important - but probably is! Time to read the sparse documentation again! Posted at 2016-11-29 by Wilberforce I tried a few things to disable interupts but no cigar at this point Posted at 2017-03-06 by BenSpark I'm having trouble communicating with a DS18B20 Temp sensor, the code works on the 8266 but not on the 32. Also for some reason since setting up the wifi, Espruino IDE wont connect via usb to the board, only over wifi. Posted at 2017-03-06 by Wilberforce a. One wire Which build are you using? Please try the latest binary: Please post you script and describe your wiring - Are you using a pull up resistor? Which pin? I have had success with using D22 and so has @jumjum b. I have had issues with the IDE on serial too. i. Is this just after flashing or all the time? I have a theory that after flashing, the USB port is left in a strange state. Posted at 2017-03-07 by Wilberforce I've downloaded the firmware above and flashed with that:
Using:
I have two sensors connected and see:
Posted at 2017-03-13 by BenSpark Thanks, I have it working now, I was using 1v91.381 firmware before which didn't work. Posted at 2017-03-14 by Wilberforce If your join the esp32 to wifi, you can then enter it's pi address in Upload of code is much faster too! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-28 by Wilberforce
Any ideas how I can debug onewire library?
I think my wiring is ok, however ow.search() is not returning anything.
Would the onewire lib be using timer functions that might not be implemented properly yet?
I added this to get around an error, but have not got any futher:
Beta Was this translation helpful? Give feedback.
All reactions