参考 http://blog.csdn.net/kzzhr/article/details/8971263

node脚本

let rpio = require('rpio')
let pins = [8, 10, 12, 11, 13, 15, 16]
for (let i = 0; i < pins.length; i ++) {
  console.log('打开', pins[i])
  rpio.open(pins[i], rpio.OUTPUT);
}


let ns = [
 //3, 4, 5, 6, 7, 8, 9
  [1, 1, 1, 1, 1, 1, 0], //0
  [0, 1, 1, 0, 0, 0, 0], //1
  [1, 1, 0, 1, 1, 0, 1], //2
  [1, 1, 1, 1, 0, 0, 1], //3
  [0, 1, 1, 0, 0, 1, 1], //4
  [1, 0, 1, 1, 0, 1, 1], //5
  [1, 0, 1, 1, 1, 1, 1], //6
  [1, 1, 1, 0, 0, 0, 0], //7
  [1, 1, 1, 1, 1, 1, 1], //8
  [1, 1, 1, 1, 0, 1, 1], //9
]


let light = function(n) {
  let item = ns[n];
  let len = item.length;
  for (let i = 0; i < len; i ++) {
    let j = item[i];
    rpio.write(pins[i], j === 0 ? rpio.LOW : rpio.HIGH)
  }
}

ns.forEach(function(item, index) {
  setTimeout(function() {
    light(index)
  }, index * 2000)
})