Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Joy to the World using J5 piezo. Crashes at "come" ( ["C4", 1] ) because it's missing a comma
var five = require('johnny-five');
five.Board().on('ready', function () {
var piezo = new five.Piezo();
var joyToWorld = {
song: [
["C5", 1],
["B4", 3/4],
["A4", 1/4],
["G4", 3/2],
["F4", 1/2],
["E4", 1],
["D4", 1],
["C4", 1]
[null, 1/2],
["G4", 1/2],
["A4", 3/2],
["A4", 1/2],
["B4", 3/2],
["B4", 1/2],
["C5", 1]
],
tempo: 80
};
// Play it !
piezo.play(joyToWorld, function() {
process.exit(1);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.