Git Product home page Git Product logo

arduino-tsic's People

Contributors

franky1 avatar lebuni avatar matthiaseibl avatar per1234 avatar schm1tz1 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arduino-tsic's Issues

getTemperture slows down dramatically when no sensor is connected

I've noticed that the function getTemperture slows down dramtically if no sensor is connected. I think this is an issue because the timeout in the function readSensor is set too high.

My explanation for the slowing would be the following (please correct me if I'm wrong ;) )
The function reads out the PIN where a TSIC should be to measure the strobe time. Therefore, it waits for the start bit, i.e. until the level goes from HIGH to LOW ("while (TSIC_HIGH)....") and then measures the strobe time as the time when the PIN is in LOW state ("while (TSIC_LOW)..."). If no sensor is connected, the level is (IMO) either LOW or HIGH and does not change its state. Which means that it will run in the timeout either in the first while loop or in the second.

Currently, the timeout is checked with "#define Cancel() if (timeout==0){return 0;}". As timeout is of uint16_t type, it will be 0 again after adding 2^16=65k times 1.

Long story short, a "#define Cancel() if (timeout>10000){return 0;}" made my program faster.

What do you think of this change in the code?

btw: here is also some code for arduino&tsic:
http://www.andeanelectronic.com/?Supporte___Arduino_con_TSic306%2CTSic506_y_TSic716

Please revert readme.md to previous version

Please revert readme.md to previous version to avoid confusion.
My readme.md contained already the documentation for my fork.
So my readme.md doesn't fit to your library.
Sorry, was my fault...

PS: I just uploaded my version of the library, if you want to have a look.

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.