Pages: 1 ... 4 5 [6]   Go Down
Author Topic: Arduino and 1-wire  (Read 14103 times)
0 Members and 1 Guest are viewing this topic.
London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 330
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Can you address more than 5 individually?
In other words not using the search function but send the command to an individual device by its id?

It could be inconvenient to get the id for each device first, depending on how many you are using.
When I got the id's for mine I used the search function in the 1-wire library and touched each in turn to raise the temperature then made a note of the ID. Keep swapping them out till youve done them all. Then I addressed each device directly to get it to send back the temperature.

I was only working with 2 devices but it was more convenient for me to know exactly which device  gave which reading. Im not using the one wire library but a cut down version Ive cobbled together from numerous sources. No search functions. Just the ability to send and receive data on the bus.

If there are limitations in the 1-wire library maybe this would help?

Gordon

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excellent suggestion! I now have 20 working. So the strategy is:

- test 3-4 at a time
- get their ids
- add ids to an array of known devices

thanks!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi all,

any ideas about how to connect multiple 1-wire temp sensor DALLAS 18B20 to arduino? (not in parasite mode)......i mean the full code to view the temp of each sensor ..

thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,all, thanks jim for his onewire library.But i used the arduino 12, i  got the following errors when the Arduino environment (11) starts up:

OneWire.cpp: In constructor 'OneWire:neWire(uint8_t)':
OneWire.cpp:74: error: 'digital_pin_to_port' was not declared in this scope
OneWire.cpp:76: error: 'port_to_output' was not declared in this scope
OneWire.cpp:77: error: 'port_to_input' was not declared in this scope
OneWire.cpp:78: error: 'port_to_mode' was not declared in this scope

so i have to fix it myself for i cannot open the link on background to get the recent files.

in onewire.h i add   #include <pins_arduino.h>
in onewire.cpp
Code:
OneWire::OneWire( uint8_t pinArg)
{
    pin = pinArg;
    /*
    port = digital_pin_to_port[pin].port;
    bit =  digital_pin_to_port[pin].bit;
    outputReg = port_to_output[port];
    inputReg = port_to_input[port];
    modeReg = port_to_mode[port];
    */
    port = digitalPinToPort(pin);
    bit =  digitalPinToBitMask(pin);
    outputReg = port_to_output_PGM[port];
    inputReg = port_to_input_PGM[port];
    modeReg = port_to_mode_PGM[port];
#if ONEWIRE_SEARCH
    reset_search();
#endif
}

now the error is gone, but i want to know that it is right ? maybe anybody can help me or give me the right link to get recent file.thanks.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone have used DS2406 switch or similar with OneWire library?

Please help, have a look on my post here
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236262942

Thanks!!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To bring this up again.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267881314

Maybe we find a solution some day  :-/
Logged

Pages: 1 ... 4 5 [6]   Go Up
Jump to: