标签:error c语言 ret nbsp class erro ini set print
1 #include <stdio.h> 2 #include <wiringPi.h> 3 #include <softPwm.h> 4 5 const int Red_Pin = 9; 6 const int Green_Pin = 10; 7 const int Blue_Pin = 11; 8 9 void RGB_Color_Init() 10 { 11 softPwmCreate(Red_Pin, 0, 100); 12 softPwmCreate(Green_Pin, 0, 100); 13 softPwmCreate(Blue_Pin, 0, 100); 14 } 15 16 int main() 17 { 18 if(wiringPiSetup() == -1) 19 { 20 printf("Error!\n"); 21 return 1; 22 } 23 RGB_Color_Init(); 24 while(1){ 25 for(int i = 255; i >= 0; i--) 26 { 27 softPwmWrite(Red_Pin, i); 28 softPwmWrite(Green_Pin, 128-i); 29 softPwmWrite(Blue_Pin, 255-i); 30 delay(10); 31 } 32 for(int i = 0; i <= 255; i++) 33 { 34 softPwmWrite(Red_Pin, i); 35 softPwmWrite(Green_Pin, 128-i); 36 softPwmWrite(Blue_Pin, 255-i); 37 delay(10); 38 } 39 } 40 return 0; 41 }
标签:error c语言 ret nbsp class erro ini set print
原文地址:https://www.cnblogs.com/demo-lv/p/14017488.html