|
try using just 'sensor1' and 'p1_y'
And also, it seems like you're trying to make the robot go forward when the sensor is active. Since p1_y is a analogue input/output, it goes from 0 to 254 (note: a common mistake for rookies - including us last year - is thinking that PWM outputs go up to 255. Although TECHNICALLY right (analogue-wise), it's a, uh, how do I put this... *bright flashing red lights*<b>bad</b> thing to output that). Anyways, if you're outputing p1_y to a PWM port, make it equal to 254.
|