reflection() error #2207
-
|
Hello, I couldn't find whether this issue was discussed, sorry if so. I always get the same error in the error account in the line tracking code error = color_sensor.reflection()-value line. But when I want to use this code async as a function, this happens, I don't have a problem without async alone. The mistake I get is always the same. I hope I was able to explain File "robot_async_actions.py", line 640, in PD_One |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
With async, you'll want to await the operation. So you can do: error = await color_sensor.reflection() - valueThis applies to any method labeled 'await' in the documentation. You can also try it out with a block program, and keeping an eye on the generated code. |
Beta Was this translation helpful? Give feedback.
With async, you'll want to await the operation. So you can do:
This applies to any method labeled 'await' in the documentation. You can also try it out with a block program, and keeping an eye on the generated code.