Does DS18B20 1-wire work on the original Omega?



  • Following this tutorial using the original Omega and Vktech DS18b20 Waterproof Temperature Sensors
    https://docs.onion.io/omega2-docs/communicating-with-1w-devices.html
    https://www.amazon.com/dp/B00CHEZ250

    Have a 4.7k pullup resistor between the data wire and the 3.3V rail; using pin 14 on the power dock.

    I'm just seeing the phantom IDs, not one that looks to be in the correct format.

    Shouldn't this work?


    Ω-ware: 0.1.4 b330

    root@Omega-0B45:~# insmod w1-gpio-custom bus0=0,14,0
    root@Omega-0B45:~# cat /sys/devices/w1_bus_master1/w1_master_slave_count
    1
    root@Omega-0B45:~# ls /sys/devices/w1_bus_master1
    00-400000000000 w1_master_attempts w1_master_search
    00-800000000000 w1_master_max_slave_count w1_master_slave_count
    driver w1_master_name w1_master_slaves
    subsystem w1_master_pointer w1_master_timeout
    uevent w1_master_pullup
    w1_master_add w1_master_remove
    root@Omega-0B45:~# cat /sys/devices/w1_bus_master1/00-800000000000/w1_slave
    cat: can't open '/sys/devices/w1_bus_master1/00-800000000000/w1_slave': No such file or directory
    root@Omega-0B45:~# ls /sys/devices/w1_bus_master1
    00-400000000000 w1_master_add w1_master_remove
    00-800000000000 w1_master_attempts w1_master_search
    00-c00000000000 w1_master_max_slave_count w1_master_slave_count
    driver w1_master_name w1_master_slaves
    subsystem w1_master_pointer w1_master_timeout
    uevent w1_master_pullup



  • Ok seems to work if I use pin 1 on the power dock to connect the data line.

    There may be restrictions on which pins you can use as GPIOs; this gave a hint:
    https://docs.onion.io/omega2-docs/expansion-dock.html

    By default, the Serial, SPI, and I2C pins implement these communication protocols and cannot be used as GPIOs. Similarly, the I2S and PWM pins are set to GPIO mode by default.

    So I see on the expansion header (different pinout than the power dock) that pins 0 and 1 are associated with I2S so I used pin 1 and that was successful.

    root@Omega-0B45:~# insmod w1-gpio-custom bus0=0,1,0
    root@Omega-0B45:~# cd /sys/bus/w1/devices/
    root@Omega-0B45:/sys/bus/w1/devices# cd 28-041671215aff/
    root@Omega-0B45:/sys/devices/w1_bus_master1/28-041671215aff# cat w1_slave
    47 01 4b 46 7f ff 0c 10 6c : crc=6c YES
    47 01 4b 46 7f ff 0c 10 6c t=20437


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.