Skip to content

Instantly share code, notes, and snippets.

@bathtimefish
Created December 21, 2014 02:21
Show Gist options
  • Save bathtimefish/36c0ead44b5bbd6259af to your computer and use it in GitHub Desktop.
Save bathtimefish/36c0ead44b5bbd6259af to your computer and use it in GitHub Desktop.
Espruino FSR402圧力センサーでLEDを点灯する
var i = setInterval(function() {
var val = analogRead(A0);
console.log(val);
if(val < 0.5) {
digitalWrite(A8,1);
} else {
digitalWrite(A8,0);
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment