Skip to content

Commit

Permalink
Added sequence reset
Browse files Browse the repository at this point in the history
  • Loading branch information
sabas1080 committed Sep 25, 2020
1 parent 8fae227 commit 27b7b04
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 9 additions & 0 deletions airQuality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,17 @@ namespace airQuality {
const ccsReset = 0xFF

function init() {

//Reset Sequence
writeCCSReg(0xFF, 0x11)
writeCCSReg(0xFF, 0xE5)
writeCCSReg(0xFF, 0x72)
writeCCSReg(0xFF, 0x8A)
basic.pause(100)

pins.i2cWriteNumber(ccsAddr, ccsApps, NumberFormat.Int8LE)
writeCCSReg(ccsMeas, 0x10)

console.log("Init")
}

Expand Down
12 changes: 8 additions & 4 deletions pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.3",
"description": "Sensor CCS811 for airQuality",
"license": "MIT",
"dependencies": {
"core": "*"
},
"files": [
"README.md",
"pxtparts.json",
Expand All @@ -11,8 +14,9 @@
],
"testFiles": [],
"public": true,
"dependencies": {
"core": "*"
},
"installedVersion": "workspace:7c0ac484-5125-43b5-9369-f869378c625b"
"supportedTargets": [
"microbit"
],
"preferredEditor": "tsprj"

}

0 comments on commit 27b7b04

Please sign in to comment.