Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var b = require('bonescript');
var pinos = [11, 12, 13, 14, 15, 16, 21, 22];
for (var i=0; i
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);
};
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);
};
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);
}
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);
}