Sebarahona
Posts: 19
Joined: Wed Jan 18, 2017 2:36 pm

I2C and 1-wire

Wed Jan 18, 2017 3:05 pm

Hello everyone,
I am trying to connect my raspberry to a temperature sensor using i2c and 1-wire (whit DS2482-800). As I understand it, it is necessary to communicate to the 1-wire using the following protocol

S: START Condition
AD,0: select DS2482
...etc

But I do not know how to do this.
I have read that you can use commands from the smbus library, such as "bus.write_i2c_block_data()" or "bus.read_i2c_block_data()".

So, Are these commands correct for proper communication between i2c and 1-wire? If so, how is its correct use?

Thanks

Raspberry Paul
Posts: 86
Joined: Mon Jun 10, 2013 3:40 pm
Contact: Website

Re: I2C and 1-wire

Wed Jan 18, 2017 3:53 pm

http://www.raspberrypaul.co.uk

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8930
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: I2C and 1-wire

Wed Jan 18, 2017 4:03 pm

Raspberry Paul wrote:I used the instructions here

http://www.sheepwalkelectronics.co.uk/RPI2_software.php
Except don't do "sudo modprobe i2c-bcm2708" as that is automagic from the device tree stuff.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “General discussion”