Advertisement
Kl43z

robot2

Nov 27th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #define BLANCO 60
  2. #define NEGRO 40
  3. #define VERDE 46
  4.  
  5. task main(){
  6. SetSensorLight (IN_1);
  7. while (TRUE){
  8. NumOut(5,5,SENSOR_1);
  9. if (SENSOR_1>58){
  10. TextOut(20,30, "BLANCO") ;
  11. PlayTone(500,50);
  12. }
  13. else if (SENSOR_1>45 && SENSOR_1<58){
  14. TextOut(20,30, "VERDEE") ;
  15. PlayTone(1000,50);
  16. }
  17. else if (SENSOR_1>35 && SENSOR_1<45){
  18. TextOut(20,30, "NEGROO");
  19. PlayTone(1500,50);
  20. }
  21. }
  22.  
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement