打開所有版子上的LED 燈:
範例 ch7\c01_LEDon.js
[php]
var b=require(‘bonescript’);
b.pinMode(‘USR0’, ‘out’);
b.pinMode(‘USR1’, ‘out’);
b.pinMode(‘USR2’, ‘out’);
b.pinMode(‘USR3’, ‘out’);
b.digitalWrite(‘USR0’, 1);
b.digitalWrite(‘USR1’, 1);
b.digitalWrite(‘USR2’, 1);
b.digitalWrite(‘USR3’, 1);
[/php]