Comments (6)
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.
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.
from calipile.
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.
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.
from calipile.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calipile.