Skip to content

Commit

Permalink
Examples: regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Sep 10, 2019
1 parent 74196b5 commit c4410e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/proximity.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ node eg/proximity.js
const {Board, Proximity} = require("johnny-five");
const board = new Board();

board.on("ready", function() {
board.on("ready", () => {
const proximity = new Proximity({
controller: "GP2Y0A21YK",
pin: "A0"
});

proximity.on("change", function() {
proximity.on("change", () => {
const {centimeters, inches} = proximity;
console.log("Proximity: ");
console.log(" cm : ", centimeters);
console.log(" in : ", inches);
Expand Down

0 comments on commit c4410e8

Please sign in to comment.