Skip to content

Commit

Permalink
Update color sensor to make more visual sense
Browse files Browse the repository at this point in the history
  • Loading branch information
shamlian committed Dec 8, 2023
1 parent b153a10 commit 837eaff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/root_robots/color_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ async def sense(robot):

while True:
try:
for c in await robot.get_color_ids():
for c in (await robot.get_color_ids())[::-1]:
# Note -- the [::-1] reverses the order of the tuple,
# which is necessary to make it look correct in the console.
if c in ColorID:
print(colors[c], end='')
else:
Expand Down

0 comments on commit 837eaff

Please sign in to comment.