You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These show using an interface board. You don't need an interface, though. On my Duemilanove, I run four OneWire sensors off a single port (2). I'm running three wires so I can run reliably on a 10 foot long bus, and the pull-up to the data line. You can run without the power wire, and use a common frame as a ground to get true one wire operation.
I have already connected the sensor to another arduino sketch.
right now I'm using duino with heimcontrol.js. where I have to modify the sketch to receive data from this sensor.
I have connected the sensor to pin 11.
and I modified the code but does not work
/*
Digital read
*/
void dr(char *pin, char *val) {
if (debug) Serial.println("dr");
int p = getPin(pin);
if(p == -1) { if(debug) Serial.println("badpin"); return; }
int oraw = 0;
if(pin==11)
{
int oraw = sensors.getTempCByIndex(0);
}
else
{
pinMode(p, INPUT);
int oraw = digitalRead(p);
}
char m[7];
sprintf(m, "%02d::%02d", p,oraw);
Serial.println(m);
}
anyone know how to connect a DS1820 sensor OneWire to receive temperature data?
The text was updated successfully, but these errors were encountered: