Giter VIP home page Giter VIP logo

Comments (4)

arkhipenko avatar arkhipenko commented on September 2, 2024 1

Example 5 simulates the behaviour of an ultrasonic sensor, which is measuring the time of sound wave travel, which, depending on the distance, is variable. Hence use of random() in the example.

Thermocouple does not have a delay, and as far I was able to find out here:
datasheet uses serial interface to send the measurement back to sketch (page 5). So there is no delay.
You just use this library adafruit and read the value.

I am not even sure you need to use code from example 5. Example 5 is a case of triggering events based on a number of sensors with unpredictable completion time. Does not seem like this is the case in your example.

from taskscheduler.

arkhipenko avatar arkhipenko commented on September 2, 2024

In my experience, unless a sensor has a capability of sending you a pin interrupt, there is no other way, so what I usually do is wait a reasonable amount of time and then timeout.

For instance, the ultrasonic sensor changes from low to high when it starts measuring, and then from high to low when it's done, so there are falling/rising edges to anchor on.
However, there is a reasonable expectation of either a distance you are interested in, or a max range, after which you stop caring.
check this out:
Event-based ultrasonic distance measurement

Gyroscopes have a designated interrupt pin for data ready purposes.
Some Thermo sensors just take a predefined time (like a 100 Ms) for measurements.

What sensor are you working with?

from taskscheduler.

dragoblaztr avatar dragoblaztr commented on September 2, 2024

I'm using MAX6675 thermpcouple, how can I configure that sketch to measure that sensor timeout, since I noticed than in that example is like this:

tSensor2.setInterval( random(1200) );

tSensor2.getInterval()

Thanks in advance

from taskscheduler.

dragoblaztr avatar dragoblaztr commented on September 2, 2024

Ok, I'll take it on mind, thanks for the advice.

Issue closed

from taskscheduler.

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.