ATENCION MIS AMIGOS DEL CLUB!! Este es un seguidor para NXT LEGO - TopicsExpress



          

ATENCION MIS AMIGOS DEL CLUB!! Este es un seguidor para NXT LEGO !!! una pequeña ayuda! ANALIZENLO! #pragma config(Sensor, S1, lightSensor, sensorLightActive) task main() { wait1Msec(100); nMaxRegulatedSpeedNxt = 500; int negro = SensorValue [lightSensor]; nxtDisplayCenteredTextLine(4, "%d", negro); wait1Msec(1000); motor[motorB] = 60; motor[motorC] = -60; wait1Msec(300); motor[motorB] = 0; motor[motorC] = 0; int blanco = SensorValue [lightSensor]; nxtDisplayCenteredTextLine(4, "%d", blanco); wait1Msec(1000); int media = (negro + blanco)/2; motor[motorB] = -60; motor[motorC] = 60; wait1Msec(200); nxtDisplayCenteredTextLine(4, "%d", media); motor[motorB] = 0; motor[motorC] = 0; wait1Msec(1000); nMaxRegulatedSpeedNxt = 1000; while(true) { if(SensorValue[lightSensor] < media){ motor[motorB] = 60; motor[motorC] = 0; } else { motor[motorB] = 0; motor[motorC] = 60; } } }
Posted on: Fri, 02 Aug 2013 23:27:15 +0000

Trending Topics



class="sttext" style="margin-left:0px; min-height:30px;"> *** 2 MORE DAYS*** That’s right, in just 2 MORE TEENY TINY

Recently Viewed Topics




© 2015