Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BLANCO 60
- #define NEGRO 40
- #define VERDE 46
- task main(){
- SetSensorLight (IN_1);
- while (TRUE){
- NumOut(5,5,SENSOR_1);
- if (SENSOR_1>58){
- TextOut(20,30, "BLANCO") ;
- PlayTone(500,50);
- }
- else if (SENSOR_1>45 && SENSOR_1<58){
- TextOut(20,30, "VERDEE") ;
- PlayTone(1000,50);
- }
- else if (SENSOR_1>35 && SENSOR_1<45){
- TextOut(20,30, "NEGROO");
- PlayTone(1500,50);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement