Hi, I am having issues trying to make this guy (UVI v.2.0) to work with my arduino.
I am running the following code:
########################################################
// This sketch looks for 1-wire devices and
// prints their addresses (serial number) to
// the UART, in a format that is useful in Arduino sketches
// Tutorial:
#include <OneWire.h>
OneWire ds(3); // Connect your 1-wire device to pin 3
void setup(void) {
Serial.begin(9600);
discoverOneWireDevices();
}
void discoverOneWireDevices(void) {
byte i;
byte present = 0;
byte data[12];
byte addr[8];
Serial.print("Looking for 1-Wire devices...\n\r");
while(ds.search(addr)) {
Serial.print("\n\rFound \'1-Wire\' device with address:\n\r");
for( i = 0; i < 8; i++) {
Serial.print("0x");
if (addr < 16) {
Serial.print('0');
}
Serial.print(addr, HEX);
if (i < 7) {
Serial.print(", ");
}
}
if ( OneWire::crc8( addr, 7) != addr[7]) {
Serial.print("CRC is not valid!\n");
return;
}
}
Serial.print("\n\r\n\rThat's it.\r\n");
ds.reset_search();
return;
}
void loop(void) {
// nothing to see here
}
########################################################
I put a DS18B20 in parasite mode and I get the following answer:
########################################################
Found '1-Wire' device with address:
0x28, 0xAD, 0x21, 0xCA, 0x02, 0x00, 0x00, 0x50
That's it.
########################################################
I put the UVI module conected to 12 v and screw 2 (DQ) to pin 3 on the arduino boards and I get no result.
Any ideas?
thanks you so much for your help.
I am running the following code:
########################################################
// This sketch looks for 1-wire devices and
// prints their addresses (serial number) to
// the UART, in a format that is useful in Arduino sketches
// Tutorial:
#include <OneWire.h>
OneWire ds(3); // Connect your 1-wire device to pin 3
void setup(void) {
Serial.begin(9600);
discoverOneWireDevices();
}
void discoverOneWireDevices(void) {
byte i;
byte present = 0;
byte data[12];
byte addr[8];
Serial.print("Looking for 1-Wire devices...\n\r");
while(ds.search(addr)) {
Serial.print("\n\rFound \'1-Wire\' device with address:\n\r");
for( i = 0; i < 8; i++) {
Serial.print("0x");
if (addr < 16) {
Serial.print('0');
}
Serial.print(addr, HEX);
if (i < 7) {
Serial.print(", ");
}
}
if ( OneWire::crc8( addr, 7) != addr[7]) {
Serial.print("CRC is not valid!\n");
return;
}
}
Serial.print("\n\r\n\rThat's it.\r\n");
ds.reset_search();
return;
}
void loop(void) {
// nothing to see here
}
########################################################
I put a DS18B20 in parasite mode and I get the following answer:
########################################################
Found '1-Wire' device with address:
0x28, 0xAD, 0x21, 0xCA, 0x02, 0x00, 0x00, 0x50
That's it.
########################################################
I put the UVI module conected to 12 v and screw 2 (DQ) to pin 3 on the arduino boards and I get no result.
Any ideas?
thanks you so much for your help.