olimex / uext-modules Goto Github PK
View Code? Open in Web Editor NEWOSHW UEXT modules
OSHW UEXT modules
In the file:
UEXT-MODULES/MOD-LTR-501ALS/ARDUINO EXAMPLE/MOD-LTR501.ino
the Lux Sensor is read with
if(stat & 0x04){
//ALS new data
unsigned char data[4];
for(int i = 0; i < 4; i++){
data[i] = Read(0x88 + i);
}
ADC_1 = (data[1] << 8) | data[0];
ADC_0 = (data[3] << 8) | data[1];
Serial.print("ALS1: ");
Serial.print(ADC_1, DEC);
Serial.println(" LUX");
Serial.print("ALS0: ");
Serial.print(ADC_0, DEC);
Serial.println(" LUX");
}
Regarding the datasheet, ADC_0 is stored in registers 0x8A (lower byte) and 0x8B (higher byte)
So the ADC_0 should instead be:
ADC_0 = (data[3] << 8) | data[2];
Am I right ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.