Rinsen / OneWire

One Wire via DS2482-100 or DS2482-800 for Windows or Linux based Raspberry Pi IoT solutions
MIT License
33 stars 14 forks source link

Support for DS2760B #5

Closed dnkmk closed 5 years ago

dnkmk commented 7 years ago

Hallo,

I'm trying to use your "simple library" to read my old OneWire temperature sensor. Could you please help me out a little, I'm one of those people that need a little more examples in order to compensate the lack of knowledge... :-)

Please advice Dann

Rinsen commented 7 years ago

I can at least give it a try :)

What kind of problems do you have? Is it code/hardware related or unknown?

Do you use some kind of factory made prototype board to house the DS2482 device or have you build a custom one?

Can you get the small provided sample to run? If not, what problem do you get?

dnkmk commented 7 years ago

I seem to have a problem with your library. My mainpage.xaml.cs looks like:

using System; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Rinsen.IoT.OneWire;

namespace test { ///

/// An empty page that can be used on its own or navigated to within a Frame. /// public sealed partial class MainPage : Page { private readonly OneWireDeviceHandler _oneWireDeviceHandler; public MainPage() { _oneWireDeviceHandler = new OneWireDeviceHandler(); this.InitializeComponent(); }

    private void button_Click(object sender, RoutedEventArgs e)

    {

        try

        {

            foreach (var device in _oneWireDeviceHandler.OneWireDevices.GetDevices<DS18B20>())

            {

                var result = device.GetTemperature();

                this.textBox.Text = result.ToString();

            }

        }

        catch (Exception exception)

        {

            this.textBox.Text = exception.Message;

        }

    }
}

}

My Raspberry Pi config Raspberry Pi 3 OS Version: 10.0.15007.1000

I’m trying to read from a OneWire DS2760B thermocouple made by Parallax. The DS2760B is used as a thermocouple (https://cdn.solarbotics.com/products/documentation/ds2760.pdf) Its data line is on GPIO 4

I was hoping to be able to look inside the library But the only info I get is the not found exception. [cid:image003.jpg@01D27676.646D9F50] How can I put the DS2760 in the library and at least detect it?

Please advise,

Dann

Van: Fredrik Rinsén [mailto:notifications@github.com] Verzonden: dinsdag 24 januari 2017 18:29 Aan: Rinsen/OneWire OneWire@noreply.github.com CC: dnkmk daniel.komkommer@outlook.com; Author author@noreply.github.com Onderwerp: Re: [Rinsen/OneWire] Support for DS2760B (#5)

I can at least give it a try :)

What kind of problems do you have? Is it code/hardware related or unknown?

Do you use some kind of factory made prototype board to house the DS2482 device or have you build a custom one?

Can you get the small sample to run? If not, what problem do you get?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Rinsen/OneWire/issues/5#issuecomment-274875274, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWVo1kZEesA9PVDBEYs0woNoBGPczjHyks5rVjS_gaJpZM4Lsd4T.

Rinsen commented 7 years ago

Is it this Exception that you receive when running?

https://github.com/Rinsen/OneWire/blob/master/src/Rinsen.IoT.OneWire/DS2482100DeviceNotFoundException.cs You should get a UndefinedOneWireDevice when you don´t have any devices of the correct type. https://github.com/Rinsen/OneWire/blob/master/src/Rinsen.IoT.OneWire/UndefinedOneWireDevice.cs

dnkmk commented 7 years ago

Yes, DeviceNotFound and I’m running your Project. So it should pop up Undefined then?

Just checking if I got things right: What should be the right connection to the RPi3b GPIO pins from the OneWire device ?

Please advise, Dann

Van: Fredrik Rinsén [mailto:notifications@github.com] Verzonden: dinsdag 24 januari 2017 23:02 Aan: Rinsen/OneWire OneWire@noreply.github.com CC: dnkmk daniel.komkommer@outlook.com; Author author@noreply.github.com Onderwerp: Re: [Rinsen/OneWire] Support for DS2760B (#5)

Is it this Exception that you receive when running?

https://github.com/Rinsen/OneWire/blob/master/src/Rinsen.IoT.OneWire/DS2482100DeviceNotFoundException.cs You should get a UndefinedOneWireDevice when you don´t have any devices of the correct type. https://github.com/Rinsen/OneWire/blob/master/src/Rinsen.IoT.OneWire/UndefinedOneWireDevice.cs

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Rinsen/OneWire/issues/5#issuecomment-274953175, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWVo1haJJSJQo1wRk2ZQEaTfPoS0zzBNks5rVnS6gaJpZM4Lsd4T.

Rinsen commented 7 years ago

You have a DS2482 device in between your i2c bus and your one wire device?

RaspberryPi does not have support for One Wire natively so you need something like this to be able to talk with One Wire devices. https://www.maximintegrated.com/en/products/interface/controllers-expanders/DS2482-100.html

It is possible to bit bang in Linux at least but this library does not provide that kind of support.

The meaning of that exception is that no DS2482 device is found and not that no OneWire device is found.

Rinsen commented 5 years ago

Closing old issues with no activity, please file a new issue if still relevant