Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Pin mapping changes for DFRobot kit air quality sensor in JS
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <ron@hybridgroup.com>
  • Loading branch information
deadprogram committed Dec 15, 2016
1 parent 2e2c122 commit 6901c8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion air-quality-sensor/javascript/README.md
Expand Up @@ -120,7 +120,7 @@ You need to have a DFRobot\* LCD Keypad Shield connected to an Arduino\*-compati

1. Plug one end of a DFRobot\* cable into the Buzzer, and connect the other end to the A1 port on the DFRobot\* LCD Keypad Shield.

2. Plug one end of a DFRobot\* cable into the Air Quality Sensor, and connect the other end to the A2 port on the DFRobot\* I/O Expansion Shield.
2. Plug one end of a DFRobot\* cable into the Air Quality Sensor, and connect the other end to the A3 port on the DFRobot\* LCD Keypad Shield.

### Installing the program manually on the Intel® Edison board

Expand Down
6 changes: 4 additions & 2 deletions air-quality-sensor/javascript/dfrobot.js
Expand Up @@ -39,13 +39,15 @@ exports.init = function(config) {
mraa.addSubplatform(mraa.GENERIC_FIRMATA, "/dev/ttyACM0");

buzzer = new mraa.Gpio(15 + 512); // aka A1
air = new (require("jsupm_gas").MQ2)(2 + 512); // aka A2
air = new (require("jsupm_gas").MQ2)(3 + 512); // aka A3
} else {
buzzer = new mraa.Gpio(15); // aka A1
air = new (require("jsupm_gas").MQ2)(2); // aka A2
air = new (require("jsupm_gas").MQ2)(3); // aka A3
}

buzzer.dir(mraa.DIR_OUT);
buzzer.write(0);

return;
}

Expand Down

0 comments on commit 6901c8f

Please sign in to comment.