UNPKG

johnny-five

Version:

The JavaScript Arduino Programming Framework.

16 lines (12 loc) 376 B
var five = require("../lib/johnny-five.js"), board = new five.Board(); board.on("ready", function() { // Creates a piezo object and defines the pin to be used for the signal var piezo = new five.Piezo(3); // Injects the piezo into the repl board.repl.inject({ piezo: piezo }); // Plays a song piezo.song("cdfda ag cdfdg gf ", "111111442111111442"); });