Giter Club home page Giter Club logo

Comments (6)

kriswiner avatar kriswiner commented on July 18, 2024

Odd but this seems to work fine on 32-bit ARM devices, but it certainly can't hurt to cast as uint32_t.

from calipile.

bprobbins avatar bprobbins commented on July 18, 2024

Weird, yes. Does work correctly on 32-bit Particle photon without cast, but gives lots of erratic (some good, some super high) results on 8-bit UNO using Arduino IDE 1.8.3 without cast

from calipile.

kriswiner avatar kriswiner commented on July 18, 2024

from calipile.

bprobbins avatar bprobbins commented on July 18, 2024

Well, now that I look more closely, Tambient and TPAMB also suffer this, though casting the second argument in TPAMB doesn't seem to help. Also I got confused because the typo of this line:
Serial.print("TPAMP = "); Serial.println(TPAMB);

from calipile.

bprobbins avatar bprobbins commented on July 18, 2024

I've fiddled around some more and when I now change the TPOBJ line as above and then also change:
// TPAMB = ( (uint16_t)(rawData[0] & 0x7F) << 8) | rawData[1] ;
to
TPAMB = (uint16_t)( (uint8_t)(rawData[0] & 0x7F) << 8) | (uint8_t)rawData[1] ;
I seem to now get a good level of stability/reliability/accuracy of measurement on my UNO. Don't know enough to know why this seems to help or whether I'm misguided. What do you think? Bug in the 1.8.3 IDE, bug in my head??? Differences in the hardware?

from calipile.

kriswiner avatar kriswiner commented on July 18, 2024

from calipile.

Related Issues (7)

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.