Create 3 OR #120
-
In regards to the proximity sensors, when I try to use the robot.set_lights_rgb(r, g, b) command I set r = 255 * sensors[2] / 4095 for example the red light won't appear until we get values on column 3 on the feedback array (see attached image) . In addition, when we try to assign an rgb value for sensor[6] the code seems to crash. Is sensor 6 unable to be used for the command robot.set_lights_rgb(r, g, b)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This question is somewhat unclear to me. What's "OR" stand for? You'll see that the array only has six elements, so while it shouldn't crash, sensor[6] does not exist (the array goes from 0 to 5). Per the iRobot Coding protocol docs, the seventh sensor is not exposed in iRobot Coding protocol version 1.4, but it will be exposed in 1.5. |
Beta Was this translation helpful? Give feedback.
This question is somewhat unclear to me. What's "OR" stand for?
You'll see that the array only has six elements, so while it shouldn't crash, sensor[6] does not exist (the array goes from 0 to 5). Per the iRobot Coding protocol docs, the seventh sensor is not exposed in iRobot Coding protocol version 1.4, but it will be exposed in 1.5.