How to use the bonescript.pinMode function in bonescript

To help you get started, we’ve selected a few bonescript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pingo-io / pingo-py / experiments / beagle / segmentos.js View on Github external
var b = require('bonescript');
var pinos = [11, 12, 13, 14, 15, 16, 21, 22];
for (var i=0; i
github jadonk / bonescript / demo / analog.js View on Github external
var b = require('bonescript');

var inputPin = "P9_36";
var outputPin = "P9_14";

b.pinMode(outputPin, b.OUTPUT);
loop();

function loop() {
    var value = b.analogRead(inputPin);
    b.analogWrite(outputPin, value);
    setTimeout(loop, 1);
};
github pingo-io / pingo-py / experiments / beagle / js / analog.js View on Github external
var b = require('bonescript');

inputPin = "P9_36";
outputPin = "P8_13";

b.pinMode(outputPin, b.OUTPUT);
loop();

function loop() {
    var value = b.analogRead(inputPin);
    b.analogWrite(outputPin, value);
    setTimeout(loop, 1);
};
github jadonk / bone101 / Support / bone101 / UI / index.html View on Github external
function checkInput(data){
    var b = require('bonescript');
    if(!b) return;
    b.pinMode(data.id, b.INPUT);
    b.pinMode(data.output, b.OUTPUT);
    outputPin = data.output;
    b.digitalRead(data.id, checkPin); 
}
github jadonk / bone101 / Support / bone101 / UI / index.html View on Github external
function checkInput(data){
    var b = require('bonescript');
    if(!b) return;
    b.pinMode(data.id, b.INPUT);
    b.pinMode(data.output, b.OUTPUT);
    outputPin = data.output;
    b.digitalRead(data.id, checkPin); 
}

bonescript

Physical computing library for embedded Linux

MIT
Latest version published 5 years ago

Package Health Score

42 / 100
Full package analysis