Cleaned up code.

Removed some unneeded calls in update function. Changed call in
micsv89.js sample file to use update instead of start.

Tested with UPM. 4.0. The micsv89 is sensitive to other devices pulling
the I2c bus up, so it is not likely to work on the Arduino breakout.
I2c 1 on mini breakout works fine.

—Signed-off-by Marc Graham <marc@m2ag.net>

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit is contained in:
Marc Graham
2015-10-12 17:55:28 -07:00
committed by Abhishek Malik
parent db3b0c39bf
commit 3d8b732158
2 changed files with 6 additions and 10 deletions

View File

@ -16,7 +16,7 @@ var mics = new upmMICSV89.MICSV89(6);
while(1)
{
mics.start();
mics.update();
while(!mics.valid());
console.log("co2: " + mics.co2equ());
console.log("short: " + mics.vocshort());