安装node.js


https://github.com/audstanley/NodeJs-Raspberry-Pi
使用命令行:

  1. wget -O - https://raw.githubusercontent.com/audstanley/NodeJs-Raspberry-Pi/master/Install-Node.sh | sudo bash
  2. node -v
  3. exit

硬件接线


RGB 小灯模块引脚 树莓派 GPIO 引脚
R pin#08(GPIO 14)
G pin#10(GPIO 15)
B pin#12(GPIO 18)
GND pin#06(Ground)

前期准备 - 图1