代码
1 | /* |
下面这段代码衔接到上面那段的后边(都放一个.c文里)
1 |
|
操作
- 先用gcc编译
1
gcc spidev_test.c
- 将树莓派的MISO和MOSI引脚短接,运行命令
1
sudo modprobe spi_bcm2835
- 运行
1
sudo ./a.out
蜗牛给自己造了个火箭
1 | /* |
下面这段代码衔接到上面那段的后边(都放一个.c文里)
1 |
|
1 | gcc spidev_test.c |
1 | sudo modprobe spi_bcm2835 |
1 | sudo ./a.out |
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true