return (fSensor get-sensor-value).\r
\r
+to update-entorno:\r
- entorno{"sensor_f"} = (fSensor get-data).\r
- entorno{"sensor_b"} = (bSensor get-data).\r
- entorno{"sensor_r"} = (rSensor get-data).\r
- entorno{"sensor_l"} = (lSensor get-data).\r
+ entorno{"sensor_f"} = (fSensor get-sensor-value).\r
+ entorno{"sensor_b"} = (bSensor get-sensor-value).\r
+ entorno{"sensor_r"} = (rSensor get-sensor-value).\r
+ entorno{"sensor_l"} = (lSensor get-sensor-value).\r
entorno{"movido"} = 0. # TODO\r
sa update-entorno with entorno. \r
\r
% Gets the sensor value. This should be used from post-iterate,\r
% if not, the sensor reading correspond to the previous\r
% iteration.\r
+ val (float).\r
+\r
+ val = self get-data.\r
+ if (val > 10): return 0.\r
+ else return 1.\r
\r
#+ to iterate:\r
\r