Skip to content
Discussion options

You must be logged in to vote

With async, you'll want to await the operation. So you can do:

error = await color_sensor.reflection() - value

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ogzhnkse
Comment options

Answer selected by ogzhnkse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants