• Pins supporting OneWire

    LoPy onewire pinout
    2
    0 Votes
    2 Posts
    36 Views
    A
    @berni You can use any digital bidirectional (i.e. non analogue input only) pin which is not allocated to another functionality. This means you should avoid: P13-P18 since they are input-only pins, P12 which is used for antenna selection, P5-P7 which are used for LoRa radio, and P0-P1 used for UART.
  • OneWire.py problem

    GPy onewire ds18b20
    26
    0 Votes
    26 Posts
    2k Views
    A
    @robert-hh said in OneWire.py problem: The [refurbished] driver is here: https://github.com/robert-hh/Onewire_DS18X20. It follows the API of the native MicroPython driver. Taking this chance, we want to thank @robert-hh so much for taking care of all the details regarding this driver. It was a real pleasure to work together with you getting this a real home and - to top it all off - big thanks that you also made its API match the one of the native driver, so people can swap them in and out. We have been doing this through [1] already and are very happy about it. [1] https://github.com/hiveeyes/hiveeyes-micropython-firmware/commit/2a23af47
  • Onewire library function does not work

    Pymakr onewire ds18b20 sensor
    2
    0 Votes
    2 Posts
    543 Views
    robert-hhR
    @brossingo G5 is an input only pin, like G4, G0, G3, G31 and G30. Try another pin, like G22 or G17 or G7 or G6 or ....
  • 0 Votes
    1 Posts
    545 Views
    No one has replied
  • How can I track my error on onewire library

    LoPy onewire lopy4 nameerror ds18b20
    5
    0 Votes
    5 Posts
    912 Views
    pierrot10P
    @robert-hh Hello. Thnak for your reply. Apparently, after the transfer, a H (or a I, etc) is added as the first caracter, as the following: H#!/usr/bin/env python3 """ OneWire library for MicroPython """ It the reason why I got that error. The problem, I can not correct it directely because after saving it, the file become newer than the source and it will be overwritten at the next sync. Then I look at the other lib file and I observed than none of them has that line. I remove and it work until I got a message stating, it can not imported DS18X20. I first open my file with textwrangler, then I open it with Atom and I observed, the text was terribly formated (A lot on the same line). I reformat it and it's works but not always.. Now the problem it state a Traceback (most recent call last): File "main.py", line 9, in <module> File "/flash/lib/onewire.py", line 2 SyntaxError: invalid syntax here is line two: #!/usr/bin/env python3 """ OneWire library for MicroPythonß """ import time import machine class OneWire: What is wrong? Then I gave a spave (return key) before the """ and I got the same error message Traceback (most recent call last): File "main.py", line 9, in <module> File "/flash/lib/onewire.py", line 1, in <module> NameError: name 'A' is not defined Then how can sync my onewire file without a formatting issue and with a unwish caracter before the first line? Does I need to check something on Atom? Thabk for your help EDIT: OK. Problem seems to be solved. I copy again the content of onewire.py to /Flash/lib/onwire.py and on Atom, at the bottom right, I changed LF to CRLF. The problem does not appear any more. That funny because my main.py has LF (and not CRLF) and I do not have this problem with main.py
  • 0 Votes
    3 Posts
    970 Views
    pierrot10P
    @robert-hh Oh! thank, I missed it. Great I am happy to try it, this evening! Thank a lot!
  • 0 Votes
    23 Posts
    8k Views
    L
    @robert-hh Yes, it looks like better choise. You could try if the figure changes if you add a smaller pull-up resistor, like 4k7 Ohm. I use already 4k7.
  • DSB1820 Onewire sensor on SiPy

    Moved SiPy sipy pymakr onewire ds18b20
    18
    0 Votes
    18 Posts
    5k Views
    L
    @sk Is this what you downloaded from board or what you have on the computer? Previously (for me still - however less than before) there are some corruption of files stored on the board. try something like this f = open('onewire.py', 'r+') d = f.readall() print(d) do you see some corruption in content? Try also downloading file throught ftp - is this file same as your on the computer?
  • Onewire, Wifi, MQTT, crash...

    Moved Issues & Bugs onewire mqtt wifi crash ds18b20
    8
    0 Votes
    8 Posts
    3k Views
    J
    The freeze with gc.collect seems to be a bug in the firmware. @daniel is already working on it : https://forum.pycom.io/post/4219