• 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
  • DS18b20 temperature values format

    SiPy ds18b20 format sensor
    3
    0 Votes
    3 Posts
    636 Views
    robert-hhR
    @brossingo I'm using this lib for Pycom devices: https://github.com/pycom/pycom-libraries/tree/master/examples/DS18X20 It works well. I tested it only with a single device on the bus, but there is also support for multiple devices.
  • Onewire library function does not work

    Pymakr onewire ds18b20 sensor
    2
    0 Votes
    2 Posts
    559 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 ....
  • How can I track my error on onewire library

    LoPy onewire lopy4 nameerror ds18b20
    5
    0 Votes
    5 Posts
    928 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
    988 Views
    pierrot10P
    @robert-hh Oh! thank, I missed it. Great I am happy to try it, this evening! Thank a lot!
  • DS18B20 not working in WiPy 2.0

    WiPy 2&3 ds18b20 wipy 2.0
    4
    0 Votes
    4 Posts
    1k Views
    L
    @colombianaus said in DS18B20 not working in WiPy 2.0: d=DS18X20(Pin.exp_board.G23, mode=Pin.OUT) now you miss Pin class... d=DS18X20(Pin(Pin.exp_board.G23, mode=Pin.OUT))
  • Woks from Atom RUN but not when uploaded

    Discussion ds18b20 pymakr pysense
    2
    0 Votes
    2 Posts
    689 Views
    M
    It looks like it needs a double scan to find the rom. After inserting ow1 = OneWire(Pin('P4')) print('found devices:', ow1.scan()) Even if the print is an empty array ('found devices:[]') then the temperature reading is working with appropriate rom... Anyone can get why? Maxi
  • 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