This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addWarning(node, regex, message) { | |
// create regex with a gontext group and insede a date regex group | |
const pattern = new RegExp('([^.,;\\n]*(' + regex + ')[^.,;\\n]*)', 'ig'); | |
const promises = []; | |
const warningClass = this.warningClass; | |
const promisifiedMatchCallback = (match, range) => { | |
// parse teh date - use just the default parses | |
const date = new Date(Date.parse(match[2])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Dust Sensor (PPD42NS) | |
* VCC 5V | |
* GND GND | |
* SIG D7 | |
*/ | |
// Pin (D7) connected to the dust sensor signal pin | |
int pin = 13; | |
volatile unsigned long pulseStartTime; // time of front raising |