Giter VIP home page Giter VIP logo

Comments (2)

rixon avatar rixon commented on June 20, 2024

Yeah, there's lots of documentation on this. Check out these:

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.

from duino.

maverik23 avatar maverik23 commented on June 20, 2024

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);
    }

from duino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.