基础步骤:
第一步:创建存放工程的文件
mkdir C
第二步:进入该文件
cd C/
第三步:创建并打开helloworld.c文件
nano helloworld.c
第四步:编写程序
include<stdio.h>
int main()
{
printf("Hello World!\n");
while(1)
{
}
return 0;
}
编写完成之后快捷键退出
ctr+x y 回车
编译:
gcc helloworld.c -o helloworld -lwiringPi
运行:
./helloworld