Created
April 21, 2016 21:36
-
-
Save scarolan/b16f82496e20815a1ab9170cd56903a2 to your computer and use it in GitHub Desktop.
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
//@module | |
exports.pins = { | |
blinkm: {type: "I2C", address: 0x09} | |
} | |
exports.configure = function() { | |
this.blinkm.init(); | |
} | |
exports.close = function() { | |
this.blinkm.close(); | |
} | |
/* | |
exports.sendcmd = function() { | |
this.blinkm.writeBlock(['n',0xff,0xff,0xff]); | |
} | |
*/ | |
exports.sendcmd = function() { | |
this.blinkm.writeByte(0x6f) | |
} |
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
http://192.168.0.64:10000/ping | |
http://192.168.0.64:10000/disconnect | |
http://192.168.0.64:10000/app/check?id=blinkm.project.kinoma.marvell.com | |
http://192.168.0.64:10000/manifest?path=applications%2Fcom.marvell.kinoma.project.blinkm&temporary=true | |
xsc6 -b -d /Users/seancarolan/Documents/Kinoma\ Code/Projects/blinkm/blinkm.js -o /Users/seancarolan/Library/Preferences//fsk/1/Kinoma\ Code/com.marvell.kinoma.project.blinkm | |
http://192.168.0.64:10000/upload?path=applications%2Fcom.marvell.kinoma.project.blinkm%2Fblinkm.jsb&temporary=true | |
http://192.168.0.64:10000/manifest?path=applications%2Fcom.marvell.kinoma.project.blinkm&put=true&temporary=true | |
http://192.168.0.64:10000/install?app=applications%2Fcom.marvell.kinoma.project.blinkm%2Fapplication.xml&temporary=true | |
http://192.168.0.64:10000/connect?host=192.168.0.52&port=5003&title=BlinkM | |
http://192.168.0.64:10000/launch | |
/fsk/kinoma/kpr/extensions/pins/sources/i2c.c:137: # Exception: writeByte: I2C writeByte failed with error kFskErrUnknown (Address 0x9, SDA pin 53, CLK pin 54).! |
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
var Pins = require("pins"); | |
Pins.configure({ | |
blinkm: { | |
require: "blinkm", | |
pins: { | |
blinkm: { sda: 53, clock: 54 }, | |
ground: { pin: 51, type: "Ground" }, | |
power: { pin: 52, type: "Power", voltage: 5.0 } | |
} | |
}, | |
}, (success) => { | |
if (success) { | |
Pins.invoke("/blinkm/sendcmd"); | |
} else { | |
trace("Failed to configure\n"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment