fork(4) download
  1. int servoL = 13; //  設定servoL為馬達使用
  2. int servoR = 12; //  設定servoR為馬達使用
  3. int i; // 設定I引數
  4. byte ON; // 設定ON給腳位9使用
  5. int f = 9;
  6. int sRwall = 3; // 設定sRWall給腳位3使用
  7. int sR = 4; // 設定sR給腳位4使用
  8. int sM = 5; // 設定sM給腳位5使用
  9. int sL = 6; // 設定sL給腳位6使用
  10. int sLwall = 8; // 設定sLwall給腳位7使用
  11. int a = 11;
  12. int b = 10;
  13. int c = 7;
  14. double duration,cm0,cm1,cm2,cm3,cm4; // 將duration,cm1,cm2,cm3設定為16位元不帶正負號的整數
  15.  
  16. void setup() {
  17. Serial.begin(9600);
  18. pinMode(a,OUTPUT);
  19. pinMode(b,OUTPUT);
  20. pinMode(c,OUTPUT);
  21. pinMode(f,INPUT);
  22. pinMode(servoR,OUTPUT);
  23. pinMode(servoL,OUTPUT);
  24. ON = digitalRead(f);
  25. digitalWrite(a,LOW);
  26. digitalWrite(b,LOW);
  27. digitalWrite(c,LOW);
  28. }
  29.  
  30.  
  31.  
  32. void loop(){
  33. ON = digitalRead(f);
  34. while(ON == 0){
  35. ON = digitalRead(f);
  36. delayMicroseconds(100);
  37. soungLwall(sLwall);
  38. soungL(sL);
  39. soungM(sM);
  40. soungR(sR);
  41. soungRwall(sRwall);
  42. if ((cm2 <= 18) && (cm3 <= 20)){
  43. Left(2);
  44. Run(6);
  45. }else if ((cm1 <= 15) && (cm3 <= 15)){
  46. delay(300);
  47. MinBack(45);
  48. delay(300);
  49. Right(22);
  50. }else if (((cm0 > 30) && (cm1 <= 20)) && (cm2 > 18)){
  51. MidRight(10);
  52. }else if (((cm0 <= 30) && (cm1 > 20)) && (cm2 <= 18)){
  53. Left(6);
  54. }else if (((cm0 <= 30) || (cm1 <= 65)) && (cm2 <= 30)){
  55. /*delay(300);
  56.   MinBack(20);
  57.   delay(300);*/
  58. soungM(sM);
  59. if (cm2 < 30){
  60. delay(300);
  61. MinBack(25);
  62. }
  63. delay(300);
  64. Right(26);
  65. Run(5);
  66. soungLwall(sLwall);
  67. soungL(sL);
  68. soungM(sM);
  69. if (((cm0 > 40) && (cm1 > 50)) && (cm2 > 25)){
  70. MidLeft(4);
  71. }
  72. }else if (((cm0 > 30) || (cm1 > 65)) && (cm2 <= 30)){
  73. /*delay(300);
  74.   MinBack(20);
  75.   delay(300);*/
  76. soungM(sM);
  77. if (cm2 < 30){
  78. delay(300);
  79. MinBack(25);
  80. }
  81. delay(300);
  82. Left(26);
  83. Run(5);
  84. }else if ((cm0 > 40) && (cm1 < 15)){
  85. Right(10);
  86. Run(10);
  87. soungLwall(sLwall);
  88. soungL(sL);
  89. soungM(sM);
  90. if (((cm0 > 40) || (cm1 > 50)) && (cm2 > 28)){
  91. MidLeft(10);
  92. }
  93. }else if ((cm0 > 50) || (cm1 > 100)){
  94. Left(4);
  95. Run(3);
  96. }else if ((cm0 <= 20) && (cm1 <= 55)){
  97. Right(4);
  98. Run(3);
  99. }else if ((cm0 > 25) && (cm1 > 45)){
  100. MidLeft(5);
  101. Run(3);
  102. }else if (cm3 <= 20){
  103. Left(4);
  104. Run(3);
  105. }else if (cm4 <= 20){
  106. MidLeft(2);
  107. Run(2);
  108. }else{
  109. Run(1);
  110. }
  111.  
  112. //*****************************************************************************************************************************************************************//
  113.  
  114. }while(ON == 1){
  115. delayMicroseconds(100);
  116. soungLwall(sLwall);
  117. soungL(sL);
  118. soungM(sM);
  119. soungR(sR);
  120. soungRwall(sRwall);
  121. if ((cm2 <= 18) && (cm1 <= 20)){
  122. Right(2);
  123. Run(3);
  124. }else if ((cm1 <= 15) && (cm3 <= 15)){
  125. delay(300);
  126. MinBack(45);
  127. delay(300);
  128. Left(22);
  129. }else if (((cm4 > 30) && (cm3 <= 20)) && (cm2 > 18)){
  130. MidLeft(10);
  131. }else if (((cm4 <= 30) && (cm3 > 20)) && (cm2 <= 18)){
  132. Right(6);
  133. }else if (((cm4 <= 30) || (cm3 <= 65)) && (cm2 <= 30)){
  134. /*delay(300);
  135.   MinBack(20);
  136.   delay(300);*/
  137. soungM(sM);
  138. if (cm2 < 30){
  139. delay(300);
  140. MinBack(25);
  141. }
  142. delay(300);
  143. Left(26);
  144. Run(5);
  145. soungRwall(sRwall);
  146. soungR(sR);
  147. soungM(sM);
  148. if (((cm4 > 60) || (cm3 > 70)) && (cm2 > 25)){
  149. MidRight(4);
  150. }
  151. }else if (((cm4 > 30) || (cm3 > 65)) && (cm2 <= 30)){
  152. /*delay(300);
  153.   MinBack(20);
  154.   delay(300);*/
  155. soungM(sM);
  156. if (cm2 < 30){
  157. delay(300);
  158. MinBack(25);
  159. }
  160. delay(300);
  161. Right(26);
  162. Run(5);
  163. }else if ((cm4 > 40) && (cm3 < 15)){
  164. Left(12);
  165. Run(10);
  166. soungRwall(sRwall);
  167. soungR(sR);
  168. soungM(sM);
  169. if (((cm4 > 30) && (cm3 > 80)) && (cm2 > 28)){
  170. MidRight(10);
  171. }
  172. }else if ((cm4 > 50) || (cm3 > 100)){
  173. Right(4);
  174. Run(3);
  175. }else if ((cm4 <= 20) && (cm3 <= 55)){
  176. Left(4);
  177. Run(3);
  178. }else if ((cm4 > 25) && (cm3 > 45)){
  179. MidRight(5);
  180. Run(3);
  181. }else if (cm1 <= 20){
  182. Right(4);
  183. Run(3);
  184. }else if (cm0 <= 20){
  185. MidRight(2);
  186. Run(2);
  187. }else{
  188. Run(1);
  189. }
  190. }
  191. }
  192.  
  193. unsigned long soungLwall(int pin){
  194. pinMode(pin, OUTPUT); // Set pin to OUTPUT
  195. digitalWrite(pin, LOW); // Ensure pin is low
  196. delayMicroseconds(2);
  197. digitalWrite(pin, HIGH); // Start ranging
  198. delayMicroseconds(5); // with 5 microsecond burst
  199. digitalWrite(pin, LOW); // End ranging
  200. pinMode(pin, INPUT); // Set pin to INPUT
  201. duration = pulseIn(pin, HIGH); // Read echo pulse
  202. cm0 = (duration / 58); // Convert to cm
  203. Serial.print(cm0); // Display result
  204. Serial.print(" ");
  205. return cm0;
  206. }
  207.  
  208. unsigned long soungL(int pin){
  209. pinMode(pin, OUTPUT); // Set pin to OUTPUT
  210. digitalWrite(pin, LOW); // Ensure pin is low
  211. delayMicroseconds(2);
  212. digitalWrite(pin, HIGH); // Start ranging
  213. delayMicroseconds(5); // with 5 microsecond burst
  214. digitalWrite(pin, LOW); // End ranging
  215. pinMode(pin, INPUT); // Set pin to INPUT
  216. duration = pulseIn(pin, HIGH); // Read echo pulse
  217. cm1 = (duration / 58); // Convert to cm
  218. Serial.print(cm1); // Display result
  219. Serial.print(" ");
  220. return cm1;
  221. }
  222.  
  223. unsigned long soungM(int pin){
  224. pinMode(pin, OUTPUT); // Set pin to OUTPUT
  225. digitalWrite(pin, LOW); // Ensure pin is low
  226. delayMicroseconds(2);
  227. digitalWrite(pin, HIGH); // Start ranging
  228. delayMicroseconds(5); // with 5 microsecond burst
  229. digitalWrite(pin, LOW); // End ranging
  230. pinMode(pin, INPUT); // Set pin to INPUT
  231. duration = pulseIn(pin, HIGH); // Read echo pulse
  232. cm2 = (duration / 58); // Convert to cm
  233. Serial.print(cm2); // Display result
  234. Serial.print(" ");
  235. return cm2;
  236. }
  237.  
  238. unsigned long soungR(int pin){
  239. pinMode(pin, OUTPUT); // Set pin to OUTPUT
  240. digitalWrite(pin, LOW); // Ensure pin is low
  241. delayMicroseconds(2);
  242. digitalWrite(pin, HIGH); // Start ranging
  243. delayMicroseconds(5); // with 5 microsecond burst
  244. digitalWrite(pin, LOW); // End ranging
  245. pinMode(pin, INPUT); // Set pin to INPUT
  246. duration = pulseIn(pin, HIGH); // Read echo pulse
  247. cm3 = (duration / 58); // Convert to cm
  248. Serial.print(cm3); // Display result
  249. Serial.print(" ");
  250. return cm3;
  251. }
  252.  
  253. unsigned long soungRwall(int pin){
  254. pinMode(pin, OUTPUT); // Set pin to OUTPUT
  255. digitalWrite(pin, LOW); // Ensure pin is low
  256. delayMicroseconds(2);
  257. digitalWrite(pin, HIGH); // Start ranging
  258. delayMicroseconds(5); // with 5 microsecond burst
  259. digitalWrite(pin, LOW); // End ranging
  260. pinMode(pin, INPUT); // Set pin to INPUT
  261. duration = pulseIn(pin, HIGH); // Read echo pulse
  262. cm4 = (duration / 58); // Convert to cm
  263. Serial.print(cm4); // Display result
  264. Serial.println(" ");
  265. return cm4;
  266. }
  267.  
  268. int MinLeft(int time){
  269. /* 00100000 */
  270. digitalWrite(a,HIGH);
  271. digitalWrite(b,LOW);
  272. digitalWrite(c,HIGH);
  273. for (i=0;i<=(time / 5);i++){
  274. digitalWrite(servoR,HIGH);
  275. delayMicroseconds(1300);
  276. digitalWrite(servoR,LOW);
  277. delay(10);
  278. digitalWrite(servoL,HIGH);
  279. delayMicroseconds(1600);
  280. digitalWrite(servoL,LOW);
  281. delay(10);
  282. }
  283. }
  284.  
  285. int Left(int time){
  286. /* 10000000 */
  287. digitalWrite(a,HIGH);
  288. digitalWrite(b,HIGH);
  289. digitalWrite(c,HIGH);
  290. for (i=0;i<=(time / 2);i++){
  291. digitalWrite(servoR,HIGH);
  292. delayMicroseconds(1300);
  293. digitalWrite(servoR,LOW);
  294. delay(10);
  295. digitalWrite(servoL,HIGH);
  296. delayMicroseconds(1430);
  297. digitalWrite(servoL,LOW);
  298. delay(10);
  299. }
  300. }
  301.  
  302. int MidLeft(int time){
  303. /* 01000000 */
  304. digitalWrite(a,HIGH);
  305. digitalWrite(b,HIGH);
  306. digitalWrite(c,LOW);
  307. for (i=0;i<=(time / 5);i++){
  308. digitalWrite(servoR,HIGH);
  309. delayMicroseconds(1300);
  310. digitalWrite(servoR,LOW);
  311. delay(10);
  312. digitalWrite(servoL,HIGH);
  313. delayMicroseconds(1550);
  314. digitalWrite(servoL,LOW);
  315. delay(10);
  316. }
  317. }
  318.  
  319. int Run(int time){
  320. /* 00010000 */
  321. digitalWrite(a,HIGH);
  322. digitalWrite(b,LOW);
  323. digitalWrite(c,LOW);
  324. for (i=0;i<=(time);i++){
  325. digitalWrite(servoR,HIGH);
  326. delayMicroseconds(1300);
  327. digitalWrite(servoR,LOW);
  328. delay(10);
  329. digitalWrite(servoL,HIGH);
  330. delayMicroseconds(1700);
  331. digitalWrite(servoL,LOW);
  332. delay(10);
  333. }
  334. }
  335.  
  336. int MidRight(int time){
  337. /* 00000010 */
  338. digitalWrite(a,LOW);
  339. digitalWrite(b,LOW);
  340. digitalWrite(c,HIGH);
  341. for (i=0;i<=(time / 5);i++){
  342. digitalWrite(servoR,HIGH);
  343. delayMicroseconds(1450);
  344. digitalWrite(servoR,LOW);
  345. delay(10);
  346. digitalWrite(servoL,HIGH);
  347. delayMicroseconds(1700);
  348. digitalWrite(servoL,LOW);
  349. delay(10);
  350. }
  351. }
  352.  
  353. int Right(int time){
  354. /* 00000001 */
  355. digitalWrite(a,LOW);
  356. digitalWrite(b,LOW);
  357. digitalWrite(c,LOW);
  358. for (i=0;i<=(time / 2);i++){
  359. digitalWrite(servoR,HIGH);
  360. delayMicroseconds(1570);
  361. digitalWrite(servoR,LOW);
  362. delay(10);
  363. digitalWrite(servoL,HIGH);
  364. delayMicroseconds(1700);
  365. digitalWrite(servoL,LOW);
  366. delay(10);
  367. }
  368. }
  369.  
  370. int MinRight(int time){
  371. /* 00000100 */
  372. digitalWrite(a,LOW);
  373. digitalWrite(b,HIGH);
  374. digitalWrite(c,LOW);
  375. for (i=0;i<=(time / 5);i++){
  376. digitalWrite(servoR,HIGH);
  377. delayMicroseconds(1400);
  378. digitalWrite(servoR,LOW);
  379. delay(10);
  380. digitalWrite(servoL,HIGH);
  381. delayMicroseconds(1700);
  382. digitalWrite(servoL,LOW);
  383. delay(10);
  384. }
  385.  
  386. }
  387.  
  388. int MinBack(int time){
  389. /* 00001000 */
  390. digitalWrite(a,LOW);
  391. digitalWrite(b,HIGH);
  392. digitalWrite(c,HIGH);
  393. for (i=0;i<=(time);i++){
  394. digitalWrite(servoR,HIGH);
  395. delayMicroseconds(1550);
  396. digitalWrite(servoR,LOW);
  397. delay(10);
  398. digitalWrite(servoL,HIGH);
  399. delayMicroseconds(1450);
  400. digitalWrite(servoL,LOW);
  401. delay(10);
  402. }
  403. }
  404.  
  405.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:4:1: error: unknown type name 'byte'
 byte ON;              //    設定ON給腳位9使用
 ^
prog.c: In function 'setup':
prog.c:17:3: error: 'Serial' undeclared (first use in this function)
   Serial.begin(9600);
   ^
prog.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
prog.c:18:3: warning: implicit declaration of function 'pinMode' [-Wimplicit-function-declaration]
   pinMode(a,OUTPUT);
   ^
prog.c:18:13: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(a,OUTPUT);
             ^
prog.c:21:13: error: 'INPUT' undeclared (first use in this function)
   pinMode(f,INPUT);
             ^
prog.c:24:3: warning: implicit declaration of function 'digitalRead' [-Wimplicit-function-declaration]
   ON = digitalRead(f);
   ^
prog.c:25:3: warning: implicit declaration of function 'digitalWrite' [-Wimplicit-function-declaration]
   digitalWrite(a,LOW);
   ^
prog.c:25:18: error: 'LOW' undeclared (first use in this function)
   digitalWrite(a,LOW);
                  ^
prog.c: In function 'loop':
prog.c:36:5: warning: implicit declaration of function 'delayMicroseconds' [-Wimplicit-function-declaration]
     delayMicroseconds(100);
     ^
prog.c:37:5: warning: implicit declaration of function 'soungLwall' [-Wimplicit-function-declaration]
     soungLwall(sLwall);
     ^
prog.c:38:5: warning: implicit declaration of function 'soungL' [-Wimplicit-function-declaration]
     soungL(sL);     
     ^
prog.c:39:5: warning: implicit declaration of function 'soungM' [-Wimplicit-function-declaration]
     soungM(sM);
     ^
prog.c:40:5: warning: implicit declaration of function 'soungR' [-Wimplicit-function-declaration]
     soungR(sR);   
     ^
prog.c:41:5: warning: implicit declaration of function 'soungRwall' [-Wimplicit-function-declaration]
     soungRwall(sRwall);    
     ^
prog.c:43:7: warning: implicit declaration of function 'Left' [-Wimplicit-function-declaration]
       Left(2); 
       ^
prog.c:44:7: warning: implicit declaration of function 'Run' [-Wimplicit-function-declaration]
       Run(6);  
       ^
prog.c:46:7: warning: implicit declaration of function 'delay' [-Wimplicit-function-declaration]
       delay(300);
       ^
prog.c:47:7: warning: implicit declaration of function 'MinBack' [-Wimplicit-function-declaration]
       MinBack(45);
       ^
prog.c:49:7: warning: implicit declaration of function 'Right' [-Wimplicit-function-declaration]
       Right(22);
       ^
prog.c:51:7: warning: implicit declaration of function 'MidRight' [-Wimplicit-function-declaration]
       MidRight(10);
       ^
prog.c:70:9: warning: implicit declaration of function 'MidLeft' [-Wimplicit-function-declaration]
         MidLeft(4);
         ^
prog.c: At top level:
prog.c:193:15: error: conflicting types for 'soungLwall'
 unsigned long soungLwall(int pin){
               ^
prog.c:37:5: note: previous implicit declaration of 'soungLwall' was here
     soungLwall(sLwall);
     ^
prog.c: In function 'soungLwall':
prog.c:194:16: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(pin, OUTPUT);          // Set pin to OUTPUT
                ^
prog.c:195:21: error: 'LOW' undeclared (first use in this function)
   digitalWrite(pin, LOW);        // Ensure pin is low
                     ^
prog.c:197:21: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(pin, HIGH);       // Start ranging
                     ^
prog.c:200:16: error: 'INPUT' undeclared (first use in this function)
   pinMode(pin, INPUT);           // Set pin to INPUT
                ^
prog.c:201:3: warning: implicit declaration of function 'pulseIn' [-Wimplicit-function-declaration]
   duration = pulseIn(pin, HIGH); // Read echo pulse
   ^
prog.c:203:3: error: 'Serial' undeclared (first use in this function)
   Serial.print(cm0);               // Display result
   ^
prog.c: At top level:
prog.c:208:15: error: conflicting types for 'soungL'
 unsigned long soungL(int pin){
               ^
prog.c:38:5: note: previous implicit declaration of 'soungL' was here
     soungL(sL);     
     ^
prog.c: In function 'soungL':
prog.c:209:16: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(pin, OUTPUT);          // Set pin to OUTPUT
                ^
prog.c:210:21: error: 'LOW' undeclared (first use in this function)
   digitalWrite(pin, LOW);        // Ensure pin is low
                     ^
prog.c:212:21: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(pin, HIGH);       // Start ranging
                     ^
prog.c:215:16: error: 'INPUT' undeclared (first use in this function)
   pinMode(pin, INPUT);           // Set pin to INPUT
                ^
prog.c:218:3: error: 'Serial' undeclared (first use in this function)
   Serial.print(cm1);               // Display result
   ^
prog.c: At top level:
prog.c:223:15: error: conflicting types for 'soungM'
 unsigned long soungM(int pin){
               ^
prog.c:39:5: note: previous implicit declaration of 'soungM' was here
     soungM(sM);
     ^
prog.c: In function 'soungM':
prog.c:224:16: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(pin, OUTPUT);          // Set pin to OUTPUT
                ^
prog.c:225:21: error: 'LOW' undeclared (first use in this function)
   digitalWrite(pin, LOW);        // Ensure pin is low
                     ^
prog.c:227:21: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(pin, HIGH);       // Start ranging
                     ^
prog.c:230:16: error: 'INPUT' undeclared (first use in this function)
   pinMode(pin, INPUT);           // Set pin to INPUT
                ^
prog.c:233:3: error: 'Serial' undeclared (first use in this function)
   Serial.print(cm2);               // Display result
   ^
prog.c: At top level:
prog.c:238:15: error: conflicting types for 'soungR'
 unsigned long soungR(int pin){
               ^
prog.c:40:5: note: previous implicit declaration of 'soungR' was here
     soungR(sR);   
     ^
prog.c: In function 'soungR':
prog.c:239:16: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(pin, OUTPUT);          // Set pin to OUTPUT
                ^
prog.c:240:21: error: 'LOW' undeclared (first use in this function)
   digitalWrite(pin, LOW);        // Ensure pin is low
                     ^
prog.c:242:21: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(pin, HIGH);       // Start ranging
                     ^
prog.c:245:16: error: 'INPUT' undeclared (first use in this function)
   pinMode(pin, INPUT);           // Set pin to INPUT
                ^
prog.c:248:3: error: 'Serial' undeclared (first use in this function)
   Serial.print(cm3);               // Display result
   ^
prog.c: At top level:
prog.c:253:15: error: conflicting types for 'soungRwall'
 unsigned long soungRwall(int pin){
               ^
prog.c:41:5: note: previous implicit declaration of 'soungRwall' was here
     soungRwall(sRwall);    
     ^
prog.c: In function 'soungRwall':
prog.c:254:16: error: 'OUTPUT' undeclared (first use in this function)
   pinMode(pin, OUTPUT);          // Set pin to OUTPUT
                ^
prog.c:255:21: error: 'LOW' undeclared (first use in this function)
   digitalWrite(pin, LOW);        // Ensure pin is low
                     ^
prog.c:257:21: error: 'HIGH' undeclared (first use in this function)
   digitalWrite(pin, HIGH);       // Start ranging
                     ^
prog.c:260:16: error: 'INPUT' undeclared (first use in this function)
   pinMode(pin, INPUT);           // Set pin to INPUT
                ^
prog.c:263:3: error: 'Serial' undeclared (first use in this function)
   Serial.print(cm4);               // Display result
   ^
prog.c: In function 'MinLeft':
prog.c:270:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(a,HIGH);
                    ^
prog.c:271:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(b,LOW);
                    ^
prog.c: In function 'Left':
prog.c:287:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(a,HIGH);
                    ^
prog.c:293:25: error: 'LOW' undeclared (first use in this function)
     digitalWrite(servoR,LOW);
                         ^
prog.c: In function 'MidLeft':
prog.c:304:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(a,HIGH);
                    ^
prog.c:306:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(c,LOW);
                    ^
prog.c: In function 'Run':
prog.c:321:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(a,HIGH);
                    ^
prog.c:322:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(b,LOW);
                    ^
prog.c: In function 'MidRight':
prog.c:338:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(a,LOW);
                    ^
prog.c:340:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(c,HIGH);
                    ^
prog.c: In function 'Right':
prog.c:355:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(a,LOW);
                    ^
prog.c:359:25: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(servoR,HIGH);
                         ^
prog.c: In function 'MinRight':
prog.c:372:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(a,LOW);
                    ^
prog.c:373:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(b,HIGH);
                    ^
prog.c: In function 'MinBack':
prog.c:390:20: error: 'LOW' undeclared (first use in this function)
     digitalWrite(a,LOW);
                    ^
prog.c:391:20: error: 'HIGH' undeclared (first use in this function)
     digitalWrite(b,HIGH);
                    ^
prog.c: In function 'MinLeft':
prog.c:283:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'Left':
prog.c:300:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'MidLeft':
prog.c:317:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'Run':
prog.c:334:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'MidRight':
prog.c:351:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'Right':
prog.c:368:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'MinRight':
prog.c:386:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'MinBack':
prog.c:403:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty