Open danalvarez opened 10 months ago
I tested that here with a LOPy4 and v1.20.2.r6 with the code from the repository, and it works as it should, even without the additional pull-up resistor.
`Pycom MicroPython 1.20.2.r6 [v1.20.1.r2-403-g01403a704] on 2023-02-08
Could you point me towards the firmware you are using? When I update my firmware to 1.20.2.r6 with the Pycom Firmware Updater GUI tool, I get:
Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28; LoPy4 with ESP32
And, if I call os.uname()
, I get:
(sysname='LoPy4', nodename='LoPy4', release='1.20.2.r6', version='v1.11-c5a0a97 on 2021-10-28', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.7.1')
I think we might not be using the same firmware...
We definitely do not use the same firmware, because I built mine myself. To be sure, I created a new one 1.20.2.r7, which you can find here: https://github.com/robert-hh/Shared-Stuff I tested it with a ds18x20 with the code from the ds18x20 repository https://github.com/robert-hh/Onewire_DS18X20 and it works.
Then, I think the problem is Pycom's 1.20.2.r6 firmware. Here are some tests I conducted:
ds18x20_example.py
from this repository.None
.Repeat test 1, but instead of using the GUI tool, use the pycom-fwtool-cli
and the 1.20.2.r6 firmware available here. The result is the same as in test 1.
pygate
version of the 1.20.2.r6 firmware available here. Update it also with the pycom-fwtool-cli
. The command is: pycom-fwtool-cli.exe -p COM3 flash --tar LoPy4-1.20.2.r6.tar.gz
ds18x20_example.py
again.pycom-fwtool-cli
.Pycom MicroPython 1.20.2.r7 [v1.20.1.r2-435-gbf9d3a698] on 2023-08-21; LoPy4 with ESP32
ds18x20_example.py
again.Any chance you could try to reproduce test 1 or 2?
With test 2 it works as well.
Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28; LoPy4 with ESP32
Dear Robert,
I know this might not be the exact place to post this, but since the Pycom forum has a lot less traffic nowadays, I was wondering if you could help me here.
I'd been using this library and it's worked great up to pycom's v1.20.2.r4 firmware. I recently updated to 1.20.2.r6, just to test, and I've noticed a weird issue I cannot seem to wrap my head around.
My setup:
temp.resolution(roms[0], 9)
line commented out.In v1.20.2.r4, the output from your example code is working OK:
But in v1.20.2.r6, the readings all return None (I assume due to a CRC check error). See:
However, and here is the weird part, if I simply run the following code in the REPL, with v1.20.2.r6, I DO get readings:
It doesn't make sense to me that the code would work well in the REPL, but not when running from
main.py
. I think this means the problem is not your library, but something weird in pycom's new FW version. Have you seen this behaviour or could you maybe reproduce it? Any ideas? Thanks!